RPC: createrawtransactions gains 'fee' pseudo-address for fee safety #2975

pull jgarzik wants to merge 2 commits into bitcoin:master from jgarzik:crt-fee-safety changing 1 files +45 −0
  1. jgarzik commented at 5:33 PM on September 4, 2013: contributor

    Suggested by gmaxwell.

  2. in src/rpcrawtransaction.cpp:None in e71d6f4147 outdated
     264 | +    }
     265 | +
     266 | +    return total;
     267 | +}
     268 | +
     269 | +static int64 txOutputTotal(const CTransaction& tx)
    


    gavinandresen commented at 12:38 AM on September 9, 2013:

    I needed this for the 'smartfee' work I'm doing; I made it a CTransaction method in core.cpp, though:

    /** Amount of bitcoins spent by the transaction. [@return](/bitcoin-bitcoin/contributor/return/) sum of all outputs (note: does not include fees)
     */
    int64 CTransaction::GetValueOut() const
    {
        int64 nValueOut = 0;
        BOOST_FOREACH(const CTxOut& txout, this->vout)
        {
            nValueOut += txout.nValue;
            if (!MoneyRange(txout.nValue) || !MoneyRange(nValueOut))
                throw std::runtime_error("GetValueOut() : value out of range");
        }
        return nValueOut;
    }
    
  3. jgarzik commented at 1:42 AM on September 9, 2013: contributor

    Note that @gmaxwell was unable to get this PR to work for him, so there is a bug in there somewher. @gavinandresen CTransaction method works

  4. laanwj added the label RPC on May 9, 2014
  5. laanwj added the label TX fees on May 9, 2014
  6. RPC: createrawtransactions gains 'fee' pseudo-address for fee safety
    Suggested by gmaxwell.
    6d47acb8a0
  7. rpcrawtransaction: use int64_t rather than int64 be96bf0a57
  8. jgarzik commented at 8:54 PM on May 20, 2014: contributor

    Rebased... though the current IRC consensus seems to lean towards another RPC 'buildrawtransaction' which has fee and coin selection smarts.

  9. BitcoinPullTester commented at 9:34 PM on May 20, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/be96bf0a577faf928376e62840cd1ea33e5fbd16 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  10. jgarzik commented at 7:01 PM on June 6, 2014: contributor

    Closing. A good idea, but buggy, and should be superceded by 'buildrawtransaction' which is smarter about fees and coin selection in general.

  11. jgarzik closed this on Jun 6, 2014

  12. jgarzik deleted the branch on Aug 24, 2014
  13. Bushstar referenced this in commit e035387783 on Apr 8, 2020
  14. Bushstar referenced this in commit 49c37b82ae on Apr 8, 2020
  15. DrahtBot locked this on Sep 8, 2021

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-13 15:16 UTC

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