From 698876e2eb63404fa3ff94dbab4f86dd25f9ed3d Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 18 Nov 2010 12:10:15 +0000 Subject: [PATCH] 2010-11-18 Tatsuhiro Tsujikawa Enter 'end game' mode from the beginning when getting torrent metadata for quick data retrieval. * src/HandshakeExtensionMessage.cc --- ChangeLog | 6 ++++++ src/HandshakeExtensionMessage.cc | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index ace54b5e..109bb1eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-11-18 Tatsuhiro Tsujikawa + + Enter 'end game' mode from the beginning when getting torrent + metadata for quick data retrieval. + * src/HandshakeExtensionMessage.cc + 2010-11-18 Tatsuhiro Tsujikawa Replaced BNode with DHTBucketTreeNode which is 2 times efficient. diff --git a/src/HandshakeExtensionMessage.cc b/src/HandshakeExtensionMessage.cc index 181ce614..c76f629b 100644 --- a/src/HandshakeExtensionMessage.cc +++ b/src/HandshakeExtensionMessage.cc @@ -137,6 +137,9 @@ void HandshakeExtensionMessage::doReceivedAction() SharedHandle pieceStorage = dctx_->getOwnerRequestGroup()->getPieceStorage(); + // We enter 'end game' mode from the start to get metadata + // quickly. + pieceStorage->enterEndGame(); peer_->reconfigureSessionResource(dctx_->getPieceLength(), dctx_->getTotalLength()); peer_->setAllBitfield();