mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-04-28 20:22:16 +00:00
log public key in weight calculation
This commit is contained in:
parent
c6197cae12
commit
c65a93b00e
@ -702,7 +702,12 @@ where
|
|||||||
let addresses = contact.addresses.clone();
|
let addresses = contact.addresses.clone();
|
||||||
let peer = entry.key().preimage().clone();
|
let peer = entry.key().preimage().clone();
|
||||||
let weight = trust.weight(contact.public_key.clone()).unwrap_or(0);
|
let weight = trust.weight(contact.public_key.clone()).unwrap_or(0);
|
||||||
println!("Calculated weight for {}: {}", entry.key().preimage().to_base58(), weight);
|
println!(
|
||||||
|
"Calculated weight for {} pk {}: {}",
|
||||||
|
entry.key().preimage().to_base58(),
|
||||||
|
bs58::encode(contact.public_key.encode().to_vec().as_slice()).into_string(),
|
||||||
|
weight
|
||||||
|
);
|
||||||
match entry.insert(contact, status, weight) {
|
match entry.insert(contact, status, weight) {
|
||||||
kbucket::InsertResult::Inserted => {
|
kbucket::InsertResult::Inserted => {
|
||||||
Some(
|
Some(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user