Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mining_prioritisetransaction.py
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
tx2_id = self.nodes[0].decoderawtransaction(tx2_hex)["txid"] | tx2_id = self.nodes[0].decoderawtransaction(tx2_hex)["txid"] | ||||
# This will raise an exception due to min relay fee not being met | # This will raise an exception due to min relay fee not being met | ||||
assert_raises_rpc_error(-26, "insufficient priority (code 66)", | assert_raises_rpc_error(-26, "insufficient priority (code 66)", | ||||
self.nodes[0].sendrawtransaction, tx2_hex) | self.nodes[0].sendrawtransaction, tx2_hex) | ||||
assert(tx2_id not in self.nodes[0].getrawmempool()) | assert(tx2_id not in self.nodes[0].getrawmempool()) | ||||
# This is a less than 1000-byte transaction, so just set the fee | # This is a less than 1000-byte transaction, so just set the fee | ||||
# to be the minimum for a 1000 byte transaction and check that it is | # to be the minimum for a 1000-byte transaction and check that it is | ||||
# accepted. | # accepted. | ||||
self.nodes[0].prioritisetransaction( | self.nodes[0].prioritisetransaction( | ||||
tx2_id, 0, int(self.relayfee * COIN)) | tx2_id, 0, int(self.relayfee * COIN)) | ||||
self.log.info( | self.log.info( | ||||
"Assert that prioritised free transaction is accepted to mempool") | "Assert that prioritised free transaction is accepted to mempool") | ||||
assert_equal(self.nodes[0].sendrawtransaction(tx2_hex), tx2_id) | assert_equal(self.nodes[0].sendrawtransaction(tx2_hex), tx2_id) | ||||
assert(tx2_id in self.nodes[0].getrawmempool()) | assert(tx2_id in self.nodes[0].getrawmempool()) | ||||
Show All 16 Lines |