@@ -3410,6 +3410,7 @@ fn stack_agg_increase() {
3410
3410
observer. get_blocks ( ) ;
3411
3411
}
3412
3412
let latest_block = latest_block. expect ( "Failed to get tip" ) ;
3413
+ //let latest_block = peer.tenure_with_txs(&[], &mut peer_nonce);
3413
3414
// Current reward cycle: 5 (starts at burn block 101)
3414
3415
let reward_cycle = get_current_reward_cycle ( & peer, & peer. config . burnchain ) ;
3415
3416
let next_reward_cycle = reward_cycle. wrapping_add ( 1 ) ;
@@ -3430,6 +3431,17 @@ fn stack_agg_increase() {
3430
3431
u128:: MAX ,
3431
3432
1 ,
3432
3433
) ;
3434
+ // Increase Error Bob Signature For Bob
3435
+ let lock_period = 1 ;
3436
+ let bob_err_signature_increase = make_signer_key_signature (
3437
+ & bob. pox_address ,
3438
+ & bob. private_key ,
3439
+ next_reward_cycle,
3440
+ & Pox4SignatureTopic :: AggregationCommit ,
3441
+ lock_period,
3442
+ u128:: MAX ,
3443
+ 1 ,
3444
+ ) ;
3433
3445
// Increase Alice Signature For Bob
3434
3446
let alice_signature_increase = make_signer_key_signature (
3435
3447
& bob. pox_address ,
@@ -3556,6 +3568,22 @@ fn stack_agg_increase() {
3556
3568
lock_period,
3557
3569
) ;
3558
3570
bob. nonce += 1 ;
3571
+ // Bob's Error Aggregate Increase
3572
+ let bobs_err_aggregate_increase = make_pox_4_aggregation_increase (
3573
+ & bob. private_key ,
3574
+ bob. nonce ,
3575
+ & bob. pox_address ,
3576
+ next_reward_cycle,
3577
+ bob_aggregate_commit_reward_index_actual
3578
+ . clone ( )
3579
+ . expect_u128 ( )
3580
+ . unwrap ( ) ,
3581
+ Some ( bob_err_signature_increase) ,
3582
+ & bob. public_key ,
3583
+ u128:: MAX ,
3584
+ 1 ,
3585
+ ) ;
3586
+ bob. nonce += 1 ;
3559
3587
// Bob's Aggregate Increase
3560
3588
let bobs_aggregate_increase = make_pox_4_aggregation_increase (
3561
3589
& bob. private_key ,
@@ -3575,6 +3603,7 @@ fn stack_agg_increase() {
3575
3603
let txs = vec ! [
3576
3604
eve_delegate_stx_to_bob_tx. clone( ) ,
3577
3605
bob_delegate_stack_stx_for_eve_tx. clone( ) ,
3606
+ bobs_err_aggregate_increase. clone( ) ,
3578
3607
bobs_aggregate_increase. clone( ) ,
3579
3608
] ;
3580
3609
@@ -3588,10 +3617,25 @@ fn stack_agg_increase() {
3588
3617
target_height. into ( ) ,
3589
3618
) ;
3590
3619
3620
+ // Fetch the error aggregate increase result & check that the err is ERR_INVALID_SIGNER_KEY
3621
+ let bob_err_increase_result_actual = & tx_block
3622
+ . receipts
3623
+ . get ( 3 )
3624
+ . unwrap ( )
3625
+ . result
3626
+ . clone ( )
3627
+ . expect_result_err ( )
3628
+ . unwrap ( ) ;
3629
+ let bob_err_increase_result_expected = Value :: Int ( 32 ) ;
3630
+ assert_eq ! (
3631
+ bob_err_increase_result_actual,
3632
+ & bob_err_increase_result_expected
3633
+ ) ;
3634
+
3591
3635
// Fetch the aggregate increase result & check that value is true
3592
3636
let bob_aggregate_increase_result = & tx_block
3593
3637
. receipts
3594
- . get ( 3 )
3638
+ . get ( 4 )
3595
3639
. unwrap ( )
3596
3640
. result
3597
3641
. clone ( )
0 commit comments