Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_fundrawtransaction.py
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# = 2 bytes * minRelayTxFeePerByte | # = 2 bytes * minRelayTxFeePerByte | ||||
feeTolerance = 2 * min_relay_tx_fee / 1000 | feeTolerance = 2 * min_relay_tx_fee / 1000 | ||||
self.nodes[2].generate(1) | self.nodes[2].generate(1) | ||||
self.sync_all() | self.sync_all() | ||||
self.nodes[0].generate(121) | self.nodes[0].generate(121) | ||||
self.sync_all() | self.sync_all() | ||||
# ensure that setting changePosition in fundraw with an exact match is handled properly | # ensure that setting changePosition in fundraw with an exact match is | ||||
# handled properly | |||||
rawmatch = self.nodes[2].createrawtransaction( | rawmatch = self.nodes[2].createrawtransaction( | ||||
[], {self.nodes[2].getnewaddress(): 50}) | [], {self.nodes[2].getnewaddress(): 50}) | ||||
rawmatch = self.nodes[2].fundrawtransaction( | rawmatch = self.nodes[2].fundrawtransaction( | ||||
rawmatch, {"changePosition": 1, "subtractFeeFromOutputs": [0]}) | rawmatch, {"changePosition": 1, "subtractFeeFromOutputs": [0]}) | ||||
assert_equal(rawmatch["changepos"], -1) | assert_equal(rawmatch["changepos"], -1) | ||||
watchonly_address = self.nodes[0].getnewaddress() | watchonly_address = self.nodes[0].getnewaddress() | ||||
watchonly_pubkey = self.nodes[ | watchonly_pubkey = self.nodes[ | ||||
▲ Show 20 Lines • Show All 722 Lines • Show Last 20 Lines |