Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_create_tx.py
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | def test_anti_fee_sniping(self): | ||||
self.nodes[0].getnewaddress(), 1000000) | self.nodes[0].getnewaddress(), 1000000) | ||||
tx = self.nodes[0].decoderawtransaction( | tx = self.nodes[0].decoderawtransaction( | ||||
self.nodes[0].gettransaction(txid)['hex']) | self.nodes[0].gettransaction(txid)['hex']) | ||||
assert 0 < tx['locktime'] <= 201 | assert 0 < tx['locktime'] <= 201 | ||||
def test_tx_size_too_large(self): | def test_tx_size_too_large(self): | ||||
# More than 10kB of outputs, so that we hit -maxtxfee with a high | # More than 10kB of outputs, so that we hit -maxtxfee with a high | ||||
# feerate | # feerate | ||||
outputs = {self.nodes[0].getnewaddress(): 25 for i in range(400)} | outputs = {self.nodes[0].getnewaddress(): 25 for _ in range(400)} | ||||
raw_tx = self.nodes[0].createrawtransaction(inputs=[], outputs=outputs) | raw_tx = self.nodes[0].createrawtransaction(inputs=[], outputs=outputs) | ||||
for fee_setting in ['-minrelaytxfee=10000', | for fee_setting in ['-minrelaytxfee=10000', | ||||
'-mintxfee=10000', '-paytxfee=10000']: | '-mintxfee=10000', '-paytxfee=10000']: | ||||
self.log.info( | self.log.info( | ||||
'Check maxtxfee in combination with {}'.format(fee_setting)) | 'Check maxtxfee in combination with {}'.format(fee_setting)) | ||||
self.restart_node(0, extra_args=[fee_setting]) | self.restart_node(0, extra_args=[fee_setting]) | ||||
assert_raises_rpc_error( | assert_raises_rpc_error( | ||||
Show All 28 Lines |