-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!(blockstore): remove an error if cid already exists (#224)
* fix(blockstore): remove an error if cid already exists In bitswap we can get blocks from peers simultanously. If some of the blocks are the same then 'put_many' could fail when inserting blocks already inserted from other peers. Since blockstore holds data associated by it's hash, it's fine to not fail an operation if data is already present. This way we won't loose blocks from other peers which were newly added. * don't update the data if cid exists in blockstore * Update blockstore/src/lru_blockstore.rs * apply in memory blockstore suggestion --------- Signed-off-by: Maciej Zwoliński <[email protected]> Co-authored-by: Yiannis Marangos <[email protected]>
- Loading branch information
Showing
5 changed files
with
12 additions
and
25 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