diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2018-02-05 21:00:57 -0500 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2018-02-08 11:01:53 -0500 |
commit | 8b8a1c4f8b10ce96fe3826ab28b82858d4ef9cf2 (patch) | |
tree | 26824c4ef396ba926cb5c3d03cfbee65d72729c7 /test/functional/mempool_limit.py | |
parent | c04e0f607a305092f336f3a77a91f9e23463943e (diff) |
Add test for 'mempool min fee not met' rpc error
Diffstat (limited to 'test/functional/mempool_limit.py')
-rwxr-xr-x | test/functional/mempool_limit.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/mempool_limit.py b/test/functional/mempool_limit.py index e7ce3820d2..1385271e6d 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, "66: mempool min fee not met", self.nodes[0].sendrawtransaction, txFS['hex']) + if __name__ == '__main__': MempoolLimitTest().main() |