@@ -231,6 +231,23 @@ def run_test(self):
231231 self .wait_until (lambda : self .nodes [0 ].getbestblockhash () == new_quorum_blockhash )
232232 assert_equal (self .nodes [0 ].quorum ("list" , llmq_type ), new_quorum_list )
233233
234+ self .log .info ("Test 'quorum rotationinfo' RPC" )
235+ genesis_blockhash = self .nodes [0 ].getblockhash (0 )
236+ block_count = self .nodes [0 ].getblockcount ()
237+ hmc_base_blockhash = self .nodes [0 ].getblockhash (block_count - (block_count % 24 ) - 24 - 8 )
238+ best_block_hash = self .nodes [0 ].getbestblockhash ()
239+ rpc_qr_info = self .nodes [0 ].quorum ("rotationinfo" , best_block_hash , False , hmc_base_blockhash )
240+ self .log .info (rpc_qr_info )
241+ assert_equal (rpc_qr_info ["mnListDiffTip" ]["blockHash" ], best_block_hash )
242+ assert_equal (rpc_qr_info ["mnListDiffTip" ]["baseBlockHash" ], rpc_qr_info ["mnListDiffH" ]["blockHash" ])
243+ assert_equal (rpc_qr_info ["mnListDiffH" ]["baseBlockHash" ], rpc_qr_info ["mnListDiffAtHMinusC" ]["blockHash" ])
244+ assert_equal (rpc_qr_info ["mnListDiffAtHMinusC" ]["blockHash" ], hmc_base_blockhash )
245+ assert_equal (rpc_qr_info ["mnListDiffAtHMinusC" ]["baseBlockHash" ], hmc_base_blockhash )
246+ assert_equal (rpc_qr_info ["mnListDiffAtHMinusC" ]["newQuorums" ], [])
247+ assert_equal (rpc_qr_info ["mnListDiffAtHMinusC" ]["deletedQuorums" ], [])
248+ assert_equal (rpc_qr_info ["mnListDiffAtHMinus2C" ]["baseBlockHash" ], rpc_qr_info ["mnListDiffAtHMinus3C" ]["blockHash" ])
249+ assert_equal (rpc_qr_info ["mnListDiffAtHMinus3C" ]["baseBlockHash" ], genesis_blockhash )
250+
234251 def test_getmnlistdiff_quorums (self , baseBlockHash , blockHash , baseQuorumList , expectedDeleted , expectedNew , testQuorumsCLSigs = True ):
235252 d = self .test_getmnlistdiff_base (baseBlockHash , blockHash , testQuorumsCLSigs )
236253
0 commit comments