Closed achingbrain closed 1 year ago
The existing peer store interface has separate sub-stores for addresses, protocols, metadata, etc.
Each method is async due to the underlying datastore being async.
This means it's impossible to do atomic writes to the peer store if you have multiple sets of data to write.
Internally, however, the default peer store implementation stores the peer data as a single datastore entry keyed on the peer id.
This PR:
set
update
@libp2p/peer-store
:tada: This PR is included in version @libp2p/interface-peer-store-v2.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
The existing peer store interface has separate sub-stores for addresses, protocols, metadata, etc.
Each method is async due to the underlying datastore being async.
This means it's impossible to do atomic writes to the peer store if you have multiple sets of data to write.
Internally, however, the default peer store implementation stores the peer data as a single datastore entry keyed on the peer id.
This PR:
set
/update
methods for peer data@libp2p/peer-store
specific init typesset
/update
for peer data