Skip to content

Commit

Permalink
kad/store: Always set localstore on an incoming record for PutRecordTo
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru Vasile <[email protected]>
  • Loading branch information
lexnv committed Apr 24, 2024
1 parent fa2e461 commit 67af687
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/protocol/libp2p/kademlia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,8 @@ impl Kademlia {
Some(KademliaCommand::PutRecordToPeers { record, query_id, peers }) => {
tracing::debug!(target: LOG_TARGET, ?query_id, key = ?record.key, "store record to DHT to specified peers");

self.store.put(record.clone());

// Put the record to the specified peers.
let peers = peers.into_iter().filter_map(|peer| {
if peer == self.service.local_peer_id {
Expand Down

0 comments on commit 67af687

Please sign in to comment.