The redeemScript functionality broke plain offline signing, this change makes it only look for that parameter when signing a p2sh input.
Signrawtransaction shouldn't require redeemScript for non-p2sh txins. #2264
pull gmaxwell wants to merge 1 commits into bitcoin:master from gmaxwell:signrawtransaction_for_regular_missing_txins changing 1 files +10 −6-
gmaxwell commented at 4:02 AM on February 2, 2013: contributor
-
21c6d3aead
Signrawtransaction shouldn't require redeemScript for non-p2sh txins.
The redeemScript functionality broke plain offline signing, this change makes it only look for that parameter when signing a p2sh input.
-
gmaxwell commented at 4:03 AM on February 2, 2013: contributor
Marked as 0.8 milestone because it's a pretty irritating regression. (I hadn't noticed until now because my normal offline signer is offline and thus isn't running the very latest bitcoind)
-
petertodd commented at 7:49 AM on February 2, 2013: contributor
ACK
Thanks, I ran into this myself a few times.
Note for anyone testing this the bug is only a problem when a txin is unknown to bitcoin, IE not in the mempool or blockchain, and therefore the scriptPubKey has to be provided explicitly.
-
in src/rpcrawtransaction.cpp:None in 21c6d3aead
420 | @@ -421,7 +421,7 @@ Value signrawtransaction(const Array& params, bool fHelp) 421 | 422 | Object prevOut = p.get_obj(); 423 | 424 | - RPCTypeCheck(prevOut, map_list_of("txid", str_type)("vout", int_type)("scriptPubKey", str_type)("redeemScript",str_type)); 425 | + RPCTypeCheck(prevOut, map_list_of("txid", str_type)("vout", int_type)("scriptPubKey", str_type));
gavinandresen commented at 10:20 PM on February 2, 2013:ACK changing this line. But I believe the only other line of code you need for this patch is one additional RPCTypeCheck right here:
RPCTypeCheck(prevOut, map_list_of("redeemScript",str_type), true);The rest of the existing code should then Do The Right Thing. The third arg to RPCTypeCheck will make redeemScript optional...
BitcoinPullTester commented at 2:35 AM on February 5, 2013: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/21c6d3aead31ba80af060749ba55c1aee9bf2cca for binaries and test log.
gavinandresen referenced this in commit 817c44a00d on Feb 6, 2013gavinandresen merged this on Feb 6, 2013gavinandresen closed this on Feb 6, 2013laudney referenced this in commit 4c17202798 on Mar 19, 2014DrahtBot locked this on Sep 8, 2021ContributorsMilestone
0.8.0
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 21:16 UTC
More mirrored repositories can be found on mirror.b10c.me