@@ -1425,9 +1425,28 @@ impl Signer {
1425
1425
} ) ;
1426
1426
if total_reject_weight. saturating_add ( min_weight) <= total_weight {
1427
1427
// Not enough rejection signatures to make a decision
1428
+ info ! ( "{self}: Received block rejection" ;
1429
+ "signer_pubkey" => public_key. to_hex( ) ,
1430
+ "signer_signature_hash" => %block_hash,
1431
+ "consensus_hash" => %block_info. block. header. consensus_hash,
1432
+ "block_height" => block_info. block. header. chain_length,
1433
+ "reject_reason" => ?rejection. response_data. reject_reason,
1434
+ "total_weight_rejected" => total_reject_weight,
1435
+ "total_weight" => total_weight,
1436
+ "percent_rejected" => ( total_reject_weight as f64 / total_weight as f64 * 100.0 ) ,
1437
+ ) ;
1428
1438
return ;
1429
1439
}
1430
- info ! ( "{self}: {total_reject_weight}/{total_weight} signers voted to reject the block {block_hash}" ) ;
1440
+ info ! ( "{self}: Received block rejection and have reached the rejection threshold" ;
1441
+ "signer_pubkey" => public_key. to_hex( ) ,
1442
+ "signer_signature_hash" => %block_hash,
1443
+ "consensus_hash" => %block_info. block. header. consensus_hash,
1444
+ "block_height" => block_info. block. header. chain_length,
1445
+ "reject_reason" => ?rejection. response_data. reject_reason,
1446
+ "total_weight_rejected" => total_reject_weight,
1447
+ "total_weight" => total_weight,
1448
+ "percent_rejected" => ( total_reject_weight as f64 / total_weight as f64 * 100.0 ) ,
1449
+ ) ;
1431
1450
if let Err ( e) = self . signer_db . mark_block_globally_rejected ( & mut block_info) {
1432
1451
warn ! ( "{self}: Failed to mark block as globally rejected: {e:?}" , ) ;
1433
1452
}
@@ -1544,12 +1563,26 @@ impl Signer {
1544
1563
} ) ;
1545
1564
1546
1565
if min_weight > signature_weight {
1547
- debug ! (
1548
- "{self}: Not enough signatures on block {} (have {}, need at least {}/{})" ,
1549
- block_hash, signature_weight, min_weight, total_weight
1566
+ info ! ( "{self}: Received block acceptance" ;
1567
+ "signer_pubkey" => public_key. to_hex( ) ,
1568
+ "signer_signature_hash" => %block_hash,
1569
+ "consensus_hash" => %block_info. block. header. consensus_hash,
1570
+ "block_height" => block_info. block. header. chain_length,
1571
+ "total_weight_approved" => signature_weight,
1572
+ "total_weight" => total_weight,
1573
+ "percent_approved" => ( signature_weight as f64 / total_weight as f64 * 100.0 ) ,
1550
1574
) ;
1551
1575
return ;
1552
1576
}
1577
+ info ! ( "{self}: Received block acceptance and have reached the threshold" ;
1578
+ "signer_pubkey" => public_key. to_hex( ) ,
1579
+ "signer_signature_hash" => %block_hash,
1580
+ "consensus_hash" => %block_info. block. header. consensus_hash,
1581
+ "block_height" => block_info. block. header. chain_length,
1582
+ "total_weight_approved" => signature_weight,
1583
+ "total_weight" => total_weight,
1584
+ "percent_approved" => ( signature_weight as f64 / total_weight as f64 * 100.0 ) ,
1585
+ ) ;
1553
1586
1554
1587
// have enough signatures to broadcast!
1555
1588
// move block to LOCALLY accepted state.
0 commit comments