Skip to content

Commit b7d68b8

Browse files
committed
fix: fix logs
1 parent e8e51e9 commit b7d68b8

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

stacks-signer/src/v0/signer.rs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,11 +1425,10 @@ impl Signer {
14251425
});
14261426
if total_reject_weight.saturating_add(min_weight) <= total_weight {
14271427
// Not enough rejection signatures to make a decision
1428-
let reject_threshold = total_weight.saturating_sub(min_weight).saturating_add(1);
14291428
info!("{self}: Received block rejection";
1430-
"signer_pubkey" => public_key,
1431-
"signer_signature_hash" => block_hash,
1432-
"consensus_hash" => block_info.block.header.consensus_hash,
1429+
"signer_pubkey" => public_key.to_hex(),
1430+
"signer_signature_hash" => %block_hash,
1431+
"consensus_hash" => %block_info.block.header.consensus_hash,
14331432
"block_height" => block_info.block.header.chain_length,
14341433
"reject_reason" => ?rejection.response_data.reject_reason,
14351434
"total_weight_rejected" => total_reject_weight,
@@ -1439,9 +1438,9 @@ impl Signer {
14391438
return;
14401439
}
14411440
info!("{self}: Received block rejection and have reached the rejection threshold";
1442-
"signer_pubkey" => public_key,
1443-
"signer_signature_hash" => block_hash,
1444-
"consensus_hash" => block_info.block.header.consensus_hash,
1441+
"signer_pubkey" => public_key.to_hex(),
1442+
"signer_signature_hash" => %block_hash,
1443+
"consensus_hash" => %block_info.block.header.consensus_hash,
14451444
"block_height" => block_info.block.header.chain_length,
14461445
"reject_reason" => ?rejection.response_data.reject_reason,
14471446
"total_weight_rejected" => total_reject_weight,
@@ -1565,24 +1564,24 @@ impl Signer {
15651564

15661565
if min_weight > signature_weight {
15671566
info!("{self}: Received block acceptance";
1568-
"signer_pubkey" => public_key,
1569-
"signer_signature_hash" => block_hash,
1570-
"consensus_hash" => block_info.block.header.consensus_hash,
1567+
"signer_pubkey" => public_key.to_hex(),
1568+
"signer_signature_hash" => %block_hash,
1569+
"consensus_hash" => %block_info.block.header.consensus_hash,
15711570
"block_height" => block_info.block.header.chain_length,
1572-
"total_weight_approved" => total_weight_approved,
1571+
"total_weight_approved" => signature_weight,
15731572
"total_weight" => total_weight,
1574-
"percent_approved" => (total_weight_approved as f64 / total_weight as f64 * 100.0),
1573+
"percent_approved" => (signature_weight as f64 / total_weight as f64 * 100.0),
15751574
);
15761575
return;
15771576
}
15781577
info!("{self}: Received block acceptance and have reached the threshold";
1579-
"signer_pubkey" => public_key,
1580-
"signer_signature_hash" => block_hash,
1581-
"consensus_hash" => block_info.block.header.consensus_hash,
1578+
"signer_pubkey" => public_key.to_hex(),
1579+
"signer_signature_hash" => %block_hash,
1580+
"consensus_hash" => %block_info.block.header.consensus_hash,
15821581
"block_height" => block_info.block.header.chain_length,
1583-
"total_weight_approved" => total_weight_approved,
1582+
"total_weight_approved" => signature_weight,
15841583
"total_weight" => total_weight,
1585-
"percent_approved" => (total_weight_approved as f64 / total_weight as f64 * 100.0),
1584+
"percent_approved" => (signature_weight as f64 / total_weight as f64 * 100.0),
15861585
);
15871586

15881587
// have enough signatures to broadcast!

0 commit comments

Comments
 (0)