@@ -54,8 +54,8 @@ pub static EVENT_RECEIVER_POLL: Duration = Duration::from_millis(500);
54
54
pub struct BlockStatus {
55
55
pub responded_signers : HashSet < StacksPublicKey > ,
56
56
pub gathered_signatures : BTreeMap < u32 , MessageSignature > ,
57
- pub total_weight_signed : u32 ,
58
- pub total_reject_weight : u32 ,
57
+ pub total_weight_approved : u32 ,
58
+ pub total_weight_rejected : u32 ,
59
59
}
60
60
61
61
#[ derive( Debug , Clone ) ]
@@ -312,14 +312,15 @@ impl StackerDBListener {
312
312
"signer_slot_id" => slot_id,
313
313
"signature" => %signature,
314
314
"signer_weight" => signer_entry. weight,
315
- "total_weight_signed" => block. total_weight_signed,
315
+ "total_weight_approved" => block. total_weight_approved,
316
+ "total_weight_rejected" => block. total_weight_rejected,
316
317
) ;
317
318
continue ;
318
319
}
319
320
320
321
if !block. gathered_signatures . contains_key ( & slot_id) {
321
- block. total_weight_signed = block
322
- . total_weight_signed
322
+ block. total_weight_approved = block
323
+ . total_weight_approved
323
324
. checked_add ( signer_entry. weight )
324
325
. expect ( "FATAL: total weight signed exceeds u32::MAX" ) ;
325
326
}
@@ -330,14 +331,15 @@ impl StackerDBListener {
330
331
"signer_slot_id" => slot_id,
331
332
"signature" => %signature,
332
333
"signer_weight" => signer_entry. weight,
333
- "total_weight_signed" => block. total_weight_signed,
334
+ "total_weight_approved" => block. total_weight_approved,
335
+ "total_weight_rejected" => block. total_weight_rejected,
334
336
"tenure_extend_timestamp" => tenure_extend_timestamp,
335
337
"server_version" => metadata. server_version,
336
338
) ;
337
339
block. gathered_signatures . insert ( slot_id, signature) ;
338
340
block. responded_signers . insert ( signer_pubkey) ;
339
341
340
- if block. total_weight_signed >= self . weight_threshold {
342
+ if block. total_weight_approved >= self . weight_threshold {
341
343
// Signal to anyone waiting on this block that we have enough signatures
342
344
cvar. notify_all ( ) ;
343
345
}
@@ -378,8 +380,8 @@ impl StackerDBListener {
378
380
}
379
381
} ;
380
382
block. responded_signers . insert ( rejected_pubkey) ;
381
- block. total_reject_weight = block
382
- . total_reject_weight
383
+ block. total_weight_rejected = block
384
+ . total_weight_rejected
383
385
. checked_add ( signer_entry. weight )
384
386
. expect ( "FATAL: total weight rejected exceeds u32::MAX" ) ;
385
387
@@ -389,15 +391,16 @@ impl StackerDBListener {
389
391
"signer_slot_id" => slot_id,
390
392
"signature" => %rejected_data. signature,
391
393
"signer_weight" => signer_entry. weight,
392
- "total_weight_signed" => block. total_weight_signed,
394
+ "total_weight_approved" => block. total_weight_approved,
395
+ "total_weight_rejected" => block. total_weight_rejected,
393
396
"reason" => rejected_data. reason,
394
397
"reason_code" => %rejected_data. reason_code,
395
398
"tenure_extend_timestamp" => rejected_data. response_data. tenure_extend_timestamp,
396
399
"server_version" => rejected_data. metadata. server_version,
397
400
) ;
398
401
399
402
if block
400
- . total_reject_weight
403
+ . total_weight_rejected
401
404
. saturating_add ( self . weight_threshold )
402
405
> self . total_weight
403
406
{
@@ -479,8 +482,8 @@ impl StackerDBListenerComms {
479
482
let block_status = BlockStatus {
480
483
responded_signers : HashSet :: new ( ) ,
481
484
gathered_signatures : BTreeMap :: new ( ) ,
482
- total_weight_signed : 0 ,
483
- total_reject_weight : 0 ,
485
+ total_weight_approved : 0 ,
486
+ total_weight_rejected : 0 ,
484
487
} ;
485
488
blocks. insert ( block. signer_signature_hash ( ) , block_status) ;
486
489
}
0 commit comments