diff --git a/test/functional/abc-sigops-mempool-mining.py b/test/functional/abc-sigops-mempool-mining.py --- a/test/functional/abc-sigops-mempool-mining.py +++ b/test/functional/abc-sigops-mempool-mining.py @@ -205,14 +205,21 @@ try: node.sendrawtransaction(ToHex(ctx)) except JSONRPCException as e: - if 'mempool full' in e.error['message'] or 'mempool min fee not met' in e.error['message']: - self.log.info( - "Mempool filled after {} transactions".format(i,)) + if 'mempool full' in e.error['message']: + # The transaction has been added to the mempool, the mempool + # trimmed then the tx removed. + removed_tx_feerate = Decimal('0.00000495') + break + if 'mempool min fee not met' in e.error['message']: + # The transaction never reached the mempool. The last + # removed tx is txid_highsigops. + removed_tx_feerate = Decimal('0.00000400') break raise else: raise RuntimeError("didn't fill mempool") + self.log.info("Mempool filled after {} transactions".format(i,)) self.log.info( 'The flooding only caused eviction of lower low sat/vbyte packages') @@ -227,11 +234,13 @@ settxids = set([txid1, txid_parent, txid_child]) assert_equal(settxids.difference(mempool_txids), set()) - self.log.info('Mempool fee floor has jumped to 1.495 sat/vbyte') - # The removed txes have feerate 495 sat/kvbyte and the fee floor jumps by - # 1000 sat/kbyte (MEMPOOL_FULL_FEE_INCREMENT) on top of that: + # The removed txes have feerate 400 or 495 sat/kvbyte and the fee floor + # jumps by 1000 sat/kbyte (MEMPOOL_FULL_FEE_INCREMENT) on top of that: + expected_min_feerate = removed_tx_feerate + Decimal('0.00001000') + self.log.info( + 'Mempool fee floor has jumped to {} sat/vbyte'.format(expected_min_feerate)) assert_equal(node.getmempoolinfo()[ - 'mempoolminfee'], Decimal('0.00001495')) + 'mempoolminfee'], expected_min_feerate) self.log.info( 'Broadcasting a regular tx still works, because wallet knows what fee to use.')