MCPcopy Create free account
hub / github.com/ElementsProject/elements / create_tx

Method create_tx

test/functional/feature_block.py:1361–1363  ·  view source on GitHub ↗
(self, spend_tx, n, value, script=CScript([OP_TRUE, OP_DROP] * 15 + [OP_TRUE]))

Source from the content-addressed store, hash-verified

1359
1360 # this is a little handier to use than the version in blocktools.py
1361 def create_tx(self, spend_tx, n, value, script=CScript([OP_TRUE, OP_DROP] * 15 + [OP_TRUE])):
1362 fee = spend_tx.vout[n].nValue.getAmount() - value
1363 return create_tx_with_script(spend_tx, n, amount=value, fee=fee, script_pub_key=script)
1364
1365 # update the fee output amount and also move it to the end
1366 def update_fee(self, tx, prev_tx, prev_n):

Callers 3

run_testMethod · 0.95
next_blockMethod · 0.95

Calls 3

CScriptClass · 0.90
create_tx_with_scriptFunction · 0.90
getAmountMethod · 0.80

Tested by

no test coverage detected