Correctly handle missing inputs in signrawtransaction. Fixes #1654. #1655

pull gmaxwell wants to merge 1 commits into bitcoin:master from gmaxwell:signrawtransaction_fix_missing changing 1 files +8 −3
  1. gmaxwell commented at 4:40 AM on August 6, 2012: contributor

    Signrawtransaction rpc was crashing when some inputs were unknown, and even with that fixed was failing to handle all the known inputs if there were unknown inputs in front of them. This commit instead attempts to fetch inputs one at a time.

  2. Correctly handle missing inputs in signrawtransaction. Fixes #1654.
    Signrawtransaction rpc was crashing when some inputs were unknown,
    and even with that fixed was failing to handle all the known inputs
    if there were unknown inputs in front of them. This commit instead
    attempts to fetch inputs one at a time.
    3557f99cf5
  3. BitcoinPullTester commented at 6:04 AM on August 8, 2012: none

    The following is an automatic comment from the Bitcoin Pull Tester. If you believe it is in error, please contact jenkins@bluematt.me

    This pull passed automatic sanity-tests! This means it merges cleanly onto current master, builds and unit-tests pass You can find the test log and build output at http://jenkins.bluematt.me/pull-tester/3557f99cf592be352cd2168157121a0cffbd6116

  4. luke-jr commented at 5:55 PM on August 8, 2012: member

    It looks reasonable, but what happens later if some inputs are missing?

  5. gmaxwell commented at 6:06 PM on August 8, 2012: contributor

    Just skips signing them:

    // Sign what we can:
    for (unsigned int i = 0; i < mergedTx.vin.size(); i++)
    {
        CTxIn& txin = mergedTx.vin[i];
        if (mapPrevOut.count(txin.prevout) == 0)
        {
            fComplete = false;
    
  6. luke-jr commented at 6:12 PM on August 8, 2012: member

    ACK

  7. gmaxwell referenced this in commit 765654dae8 on Aug 9, 2012
  8. gmaxwell merged this on Aug 9, 2012
  9. gmaxwell closed this on Aug 9, 2012

  10. suprnurd referenced this in commit 8e9289e12b on Dec 5, 2017
  11. DrahtBot locked this on Sep 8, 2021

Milestone
0.7.0


github-metadata-mirror

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

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me