Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

feat!: make peerstore atomic #75

Merged
merged 8 commits into from
Apr 24, 2023
Merged

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Apr 21, 2023

Instead of having separate books for addresses, protocols etc, just have simple save/merge/patch methods for updating peer data.

This means we can update peer data in one call instead of needing to make multiple async calls.

Instead of having separate books for addresses, protocols etc, just
have simple save/merge/patch methods for updating peer data.

This means we can update peer data in one call instead of needing to
make multiple async calls.

Creation of new peer records is now centralised so events can be
emitted cleanly and there's no chance of another async call creating
the peer record before you so locking can be removed.
@achingbrain
Copy link
Member Author

achingbrain commented Apr 21, 2023

Blocked on libp2p/js-libp2p-interfaces#368

@achingbrain achingbrain marked this pull request as draft April 21, 2023 10:09
@achingbrain achingbrain marked this pull request as ready for review April 21, 2023 13:50
@achingbrain achingbrain marked this pull request as draft April 21, 2023 18:01
@achingbrain achingbrain marked this pull request as ready for review April 24, 2023 13:46
@achingbrain achingbrain merged commit 4e89d3b into master Apr 24, 2023
@achingbrain achingbrain deleted the feat/make-peerstore-atomic branch April 24, 2023 13:47
github-actions bot pushed a commit that referenced this pull request Apr 24, 2023
## [8.0.0](v7.0.2...v8.0.0) (2023-04-24)

### ⚠ BREAKING CHANGES

* make peerstore atomic (#75)

### Features

* make peerstore atomic ([#75](#75)) ([4e89d3b](4e89d3b))
@github-actions
Copy link

🎉 This PR is included in version 8.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants