@@ -444,13 +444,7 @@ impl MasternodeListEngine {
444444
445445 self . known_snapshots
446446 . insert ( mn_list_diff_at_h_minus_3c. block_hash , quorum_snapshot_at_h_minus_3c) ;
447- let mn_list_diff_at_h_minus_3c_block_hash = mn_list_diff_at_h_minus_3c. block_hash ;
448- self . apply_diff ( mn_list_diff_at_h_minus_3c, None , false , None ) ?. ok_or (
449- QuorumValidationError :: RequiredRotatedChainLockSigNotPresent (
450- 3 ,
451- mn_list_diff_at_h_minus_3c_block_hash,
452- ) ,
453- ) ?;
447+ self . apply_diff ( mn_list_diff_at_h_minus_3c, None , false , None ) ?;
454448 self . known_snapshots
455449 . insert ( mn_list_diff_at_h_minus_2c. block_hash , quorum_snapshot_at_h_minus_2c) ;
456450 let mn_list_diff_at_h_minus_2c_block_hash = mn_list_diff_at_h_minus_2c. block_hash ;
@@ -462,19 +456,14 @@ impl MasternodeListEngine {
462456 let mn_list_diff_at_h_block_hash = mn_list_diff_h. block_hash ;
463457 let maybe_sigm0 = self . apply_diff ( mn_list_diff_h, None , false , None ) ?;
464458
465- let sigs = if maybe_sigm2. is_some ( ) && maybe_sigm1. is_some ( ) && maybe_sigm0. is_some ( ) {
466- Some ( [ maybe_sigm2. unwrap ( ) , maybe_sigm1. unwrap ( ) , maybe_sigm0. unwrap ( ) ] )
467- } else {
468- None
459+ let sigs = match ( maybe_sigm2, maybe_sigm1, maybe_sigm0) {
460+ ( Some ( s2) , Some ( s1) , Some ( s0) ) => Some ( [ s2, s1, s0] ) ,
461+ _ => None ,
469462 } ;
470463
471464 let mn_list_diff_tip_block_hash = mn_list_diff_tip. block_hash ;
472- let sigmtip = self
473- . apply_diff ( mn_list_diff_tip, None , verify_tip_non_rotated_quorums, sigs) ?
474- . ok_or ( QuorumValidationError :: RequiredRotatedChainLockSigNotPresent (
475- 0 ,
476- mn_list_diff_tip_block_hash,
477- ) ) ?;
465+ let maybe_sigmtip =
466+ self . apply_diff ( mn_list_diff_tip, None , verify_tip_non_rotated_quorums, sigs) ?;
478467
479468 let qualified_last_commitment_per_index = last_commitment_per_index
480469 . into_iter ( )
@@ -486,24 +475,30 @@ impl MasternodeListEngine {
486475 } else {
487476 let sigm2 = maybe_sigm2. ok_or (
488477 QuorumValidationError :: RequiredRotatedChainLockSigNotPresent (
489- 2 ,
478+ 3 ,
490479 mn_list_diff_at_h_minus_2c_block_hash,
491480 ) ,
492481 ) ?;
493482
494483 let sigm1 = maybe_sigm1. ok_or (
495484 QuorumValidationError :: RequiredRotatedChainLockSigNotPresent (
496- 1 ,
485+ 2 ,
497486 mn_list_diff_at_h_minus_c_block_hash,
498487 ) ,
499488 ) ?;
500489
501490 let sigm0 = maybe_sigm0. ok_or (
502491 QuorumValidationError :: RequiredRotatedChainLockSigNotPresent (
503- 0 ,
492+ 1 ,
504493 mn_list_diff_at_h_block_hash,
505494 ) ,
506495 ) ?;
496+ let sigmtip = maybe_sigmtip. ok_or (
497+ QuorumValidationError :: RequiredRotatedChainLockSigNotPresent (
498+ 0 ,
499+ mn_list_diff_tip_block_hash,
500+ ) ,
501+ ) ?;
507502 let mut qualified_quorum_entry: QualifiedQuorumEntry = quorum_entry. into ( ) ;
508503 qualified_quorum_entry. verifying_chain_lock_signature =
509504 Some ( VerifyingChainLockSignaturesType :: Rotating ( [
0 commit comments