forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement RemoveAskFor to indicate that we're not interested in an it…
…em anymore (#2384) * Implement RemoveAskFor to indicate that we're not interested in an item anymore When an INV item is received from the first node, the item is requested immediately. If the same item is received from another node, an entry is added to mapAskFor which marks the item for re-requesting in case the first node did not respond. When the item is received from the first node, the item was previously never removed from mapAskFor. Only the later getdata loop in SendMessages would then gradually remove items from the map. This is quite delayed however as the entries in mapAskFor have a timeout value. RemoveAskFor allows to remove all entries from mapAskFor and setAskFor when we are not interested in the item anymore (e.g. because we received it already). * Call RemoveAskFor whenever we receive a message * Only pass hash instead of CInv object to RemoveAskFor
- Loading branch information
Showing
8 changed files
with
62 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters