@@ -22,6 +22,9 @@ def set_test_params(self):
2222 saplingUpgrade = ['-nuparams=v5_dummy:1' ]
2323 self .extra_args = [saplingUpgrade , saplingUpgrade , saplingUpgrade , saplingUpgrade ]
2424
25+ def check_tx_priority (self , mempool , mytxid ):
26+ assert (Decimal (mempool [mytxid ]['startingpriority' ]) == Decimal ('1E+25' ))
27+
2528 def run_test (self ):
2629 # generate 100 more to activate sapling in regtest
2730 self .nodes [2 ].generate (12 )
@@ -54,13 +57,12 @@ def run_test(self):
5457 recipients .append ({"address" : saplingAddr0 , "amount" : Decimal ('10' )})
5558 coinstake = get_coinstake_address (self .nodes [0 ])
5659 mytxid = self .nodes [0 ].shielded_sendmany (coinstake , recipients , 1 , nMinDefaultSaplingFee )
57- assert (mytxid != "SendTransaction: CommitTransaction failed" )
5860
5961 self .sync_all ()
6062
6163 # Verify priority of tx is INF_PRIORITY, defined as 1E+25 (10000000000000000000000000)
6264 mempool = self .nodes [0 ].getrawmempool (True )
63- assert ( Decimal ( mempool [ mytxid ][ 'startingpriority' ]) == Decimal ( '1E+25' ) )
65+ self . check_tx_priority ( mempool , mytxid )
6466
6567 # Shield another coinbase UTXO
6668 mytxid = self .nodes [0 ].shielded_sendmany (get_coinstake_address (self .nodes [0 ]), recipients , 1 , nMinDefaultSaplingFee )
@@ -85,7 +87,7 @@ def run_test(self):
8587
8688 # Verify priority of tx is MAX_PRIORITY, defined as 1E+25 (10000000000000000000000000)
8789 mempool = self .nodes [0 ].getrawmempool (True )
88- assert ( Decimal ( mempool [ mytxid ][ 'startingpriority' ]) == Decimal ( '1E+25' ) )
90+ self . check_tx_priority ( mempool , mytxid )
8991
9092 self .nodes [2 ].generate (1 )
9193 self .sync_all ()
@@ -103,12 +105,11 @@ def run_test(self):
103105 recipients .append ({"address" : saplingAddr0 , "amount" : Decimal ('5' )})
104106 recipients .append ({"address" : taddr1 , "amount" : Decimal ('5' )})
105107 mytxid = self .nodes [1 ].shielded_sendmany (saplingAddr1 , recipients , 1 , nMinDefaultSaplingFee )
106- assert (mytxid != "SendTransaction: CommitTransaction failed" )
107108 self .sync_all ()
108109
109110 # Verify priority of tx is MAX_PRIORITY, defined as 1E+25 (10000000000000000000000000)
110111 mempool = self .nodes [1 ].getrawmempool (True )
111- assert ( Decimal ( mempool [ mytxid ][ 'startingpriority' ]) == Decimal ( '1E+25' ) )
112+ self . check_tx_priority ( mempool , mytxid )
112113
113114 self .nodes [2 ].generate (1 )
114115 self .sync_all ()
0 commit comments