mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 00:58:11 -05:00
fix(disc): only start pinging new node if insert succesful (#1435)
This commit is contained in:
@@ -809,13 +809,18 @@ impl Discv4Service {
|
||||
match self.kbuckets.entry(&key) {
|
||||
kbucket::Entry::Absent(entry) => {
|
||||
let node = NodeEntry::new(record);
|
||||
let _ = entry.insert(
|
||||
match entry.insert(
|
||||
node,
|
||||
NodeStatus {
|
||||
direction: ConnectionDirection::Outgoing,
|
||||
state: ConnectionState::Disconnected,
|
||||
},
|
||||
);
|
||||
) {
|
||||
BucketInsertResult::Inserted | BucketInsertResult::Pending { .. } => {
|
||||
debug!(target : "discv4", ?record, "inserted new record");
|
||||
}
|
||||
_ => return,
|
||||
}
|
||||
}
|
||||
_ => return,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user