The padding goes after OP_RETURN
Details
Details
- Reviewers
deadalnix jasonbcox - Group Reviewers
Restricted Project - Commits
- rSTAGING07fa32b405c2: [tests] Fix tx padding
rABC07fa32b405c2: [tests] Fix tx padding
Test pad_raw_tx with and without -acceptnonstdtxn
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- qa-opreturn-fix
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 4622 Build 7307: Bitcoin ABC Buildbot (legacy) Build 7306: arc lint + arc unit
Event Timeline
Comment Actions
#!/usr/bin/env python3 from test_framework.test_framework import BitcoinTestFramework from test_framework.txtools import pad_raw_tx class OpRet(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 self.extra_args = [["-acceptnonstdtxn=0"]] def run_test(self): n = self.nodes[0] txid_in = n.getblock(n.generate(1)[0])['tx'][0] n.generate(101) rawtx = n.createrawtransaction([{ 'txid' : txid_in, 'vout' : 0}], { n.getnewaddress() : 1 }) rawtx = n.signrawtransaction(pad_raw_tx(rawtx))['hex'] n.sendrawtransaction(rawtx, True) OpRet().main()
Thus script will fail on test_framework.authproxy.JSONRPCException: 64: scriptpubkey (-26) without this fix.