Add RPC call getrawwallettransaction #3663

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2014_02_rpc_getrawwallettransaction changing 4 files +52 −0
  1. laanwj commented at 8:42 am on February 13, 2014: member

    This allows getting raw transaction data from the wallet even if the transaction is no longer in the blockchain / mempool (for example if it got orphaned due to malleability abuse).

    Allows a verbose flag just like getrawtransaction.

    getrawwallettransaction

    Was also proposed in #3220, but is urgently useful now.

  2. Add RPC call `getrawwallettransaction`
    This allows getting raw transaction data from the wallet even if the
    transaction is no longer in the blockchain / mempool (for example if it
    got orphaned due to malleability abuse).
    
    Was also proposed in #3220, but is urgently useful now.
    b23aaf8207
  3. BitcoinPullTester commented at 9:03 am on February 13, 2014: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/b23aaf8207deafdff04cfed279c4c509541df376 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.
  4. jgarzik commented at 2:30 pm on February 13, 2014: contributor

    meh. gettransaction and getrawtransaction also work on wallet transactions. Naming is confusing, and perhaps implies redundancy:

    Just make getrawtransaction find these TXs, also. No apparent need for a new RPC.

  5. sipa commented at 2:32 pm on February 13, 2014: member

    gettransaction is a wallet RPC, but doesn’t return the raw transaction.

    getrawtransaction is not guaranteed to work on wallet transactions. It works on mempool transactions, and on blockchain transactions if txindex is enabled.

    My suggestion would be to add the raw transaction as an extra field to the gettransaction output?

  6. jgarzik commented at 2:33 pm on February 13, 2014: contributor
    @sipa That works, too.
  7. gavinandresen commented at 3:06 pm on February 13, 2014: contributor
    +1 to adding the rawtransaction data to gettransaction.
  8. laanwj commented at 3:41 pm on February 13, 2014: member

    @jgarzik It would be a bad idea to make getrawtransaction query the wallet. IMO, we don’t want to confuse wallet and other node functionality even further. Having seperate methods makes it easier to modularize. Also it would become a method like getinfo and validatetx that does a different thing based on enablewallet/disablewallet.

    Adding rawtransaction data to gettransaction is fine with me.

    But I think I’m the only one caring about this functionality anyway, closing.

  9. laanwj closed this on Feb 13, 2014

  10. sipa commented at 3:58 pm on February 13, 2014: member
    No, I really think we need this. Forcing people to enable txindex to be able to get their own transactions is ridiculous.
  11. laanwj commented at 4:32 pm on February 13, 2014: member
    Ok see #3668
  12. 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: 2024-10-05 04:12 UTC

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