log public key in weight calculation

This commit is contained in:
folex 2020-03-29 00:35:32 +03:00
parent c6197cae12
commit c65a93b00e

View File

@ -702,7 +702,12 @@ where
let addresses = contact.addresses.clone();
let peer = entry.key().preimage().clone();
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) {
kbucket::InsertResult::Inserted => {
Some(