Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool_limit.py
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
assert_greater_than(self.nodes[0].getmempoolinfo()[ | assert_greater_than(self.nodes[0].getmempoolinfo()[ | ||||
'mempoolminfee'], Decimal('0.00001000')) | 'mempoolminfee'], Decimal('0.00001000')) | ||||
self.log.info('Create a mempool tx that will not pass mempoolminfee') | self.log.info('Create a mempool tx that will not pass mempoolminfee') | ||||
us0 = utxos.pop() | us0 = utxos.pop() | ||||
inputs = [{"txid": us0["txid"], "vout": us0["vout"]}] | inputs = [{"txid": us0["txid"], "vout": us0["vout"]}] | ||||
outputs = {self.nodes[0].getnewaddress(): 0.0001} | outputs = {self.nodes[0].getnewaddress(): 0.0001} | ||||
tx = self.nodes[0].createrawtransaction(inputs, outputs) | tx = self.nodes[0].createrawtransaction(inputs, outputs) | ||||
# specifically fund this tx with a fee < mempoolminfee, >= than minrelaytxfee | # specifically fund this tx with a fee < mempoolminfee, >= than | ||||
# minrelaytxfee | |||||
txF = self.nodes[0].fundrawtransaction(tx, {'feeRate': relayfee}) | txF = self.nodes[0].fundrawtransaction(tx, {'feeRate': relayfee}) | ||||
txFS = self.nodes[0].signrawtransactionwithwallet(txF['hex']) | txFS = self.nodes[0].signrawtransactionwithwallet(txF['hex']) | ||||
assert_raises_rpc_error(-26, "mempool min fee not met", | assert_raises_rpc_error(-26, "mempool min fee not met", | ||||
self.nodes[0].sendrawtransaction, txFS['hex']) | self.nodes[0].sendrawtransaction, txFS['hex']) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
MempoolLimitTest().main() | MempoolLimitTest().main() |