aboutsummaryrefslogtreecommitdiff
path: root/test/functional/mempool_limit.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/mempool_limit.py')
-rwxr-xr-xtest/functional/mempool_limit.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/mempool_limit.py b/test/functional/mempool_limit.py
index e7ce3820d2..7e01663c96 100755
--- a/test/functional/mempool_limit.py
+++ b/test/functional/mempool_limit.py
@@ -50,5 +50,15 @@ class MempoolLimitTest(BitcoinTestFramework):
assert_equal(self.nodes[0].getmempoolinfo()['minrelaytxfee'], Decimal('0.00001000'))
assert_greater_than(self.nodes[0].getmempoolinfo()['mempoolminfee'], Decimal('0.00001000'))
+ self.log.info('Create a mempool tx that will not pass mempoolminfee')
+ us0 = utxos.pop()
+ inputs = [{ "txid" : us0["txid"], "vout" : us0["vout"]}]
+ outputs = {self.nodes[0].getnewaddress() : 0.0001}
+ tx = self.nodes[0].createrawtransaction(inputs, outputs)
+ # specifically fund this tx with a fee < mempoolminfee, >= than minrelaytxfee
+ txF = self.nodes[0].fundrawtransaction(tx, {'feeRate': relayfee})
+ txFS = self.nodes[0].signrawtransaction(txF['hex'])
+ assert_raises_rpc_error(-26, "mempool min fee not met, 166 < 411 (code 66)", self.nodes[0].sendrawtransaction, txFS['hex'])
+
if __name__ == '__main__':
MempoolLimitTest().main()