Skip to content

Commit

Permalink
Merge pull request #2091 from maqi/log_spend_size
Browse files Browse the repository at this point in the history
chore(client): log spend size
  • Loading branch information
jacderida authored Sep 5, 2024
2 parents 9fa379d + 58e3167 commit 82bd5ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions sn_client/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,16 +824,19 @@ impl Client {
let network_address = NetworkAddress::from_spend_address(cash_note_addr);

let key = network_address.to_record_key();
let pretty_key = PrettyPrintRecordKey::from(&key);
trace!("Sending spend {unique_pubkey:?} to the network via put_record, with addr of {cash_note_addr:?} - {pretty_key:?}");

let record_kind = RecordKind::Spend;
let record = Record {
key,
key: key.clone(),
value: try_serialize_record(&[spend], record_kind)?.to_vec(),
publisher: None,
expires: None,
};

let pretty_key = PrettyPrintRecordKey::from(&key);
info!("Sending spend {unique_pubkey:?} to the network via put_record, with addr of {cash_note_addr:?} - {pretty_key:?}, size of {}",
record.value.len());

let (record_to_verify, expected_holders) = if verify_store {
let expected_holders: HashSet<_> = self
.network
Expand Down
2 changes: 1 addition & 1 deletion sn_client/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ impl Client {

// send spends to the network in parralel
for spend_request in spend_requests {
debug!(
trace!(
"sending spend request to the network: {:?}: {spend_request:#?}",
spend_request.unique_pubkey()
);
Expand Down

0 comments on commit 82bd5ee

Please sign in to comment.