add getwalletinfo RPC call with wallet transaction count #3717

pull djpnewton wants to merge 1 commits into bitcoin:master from djpnewton:wallet-txcount changing 3 files +34 −0
  1. djpnewton commented at 4:59 AM on February 21, 2014: contributor

    As far as I can tell there is no easy way to get the number of transactions in a wallet.

    If it is considered that "getinfo" is getting too cluttered this could probably be tacked onto the end of "listsinceblock" instead

    Edit @laanwj: updated pull title

  2. jgarzik commented at 5:32 AM on February 21, 2014: contributor

    I've no objection to exporting this info in general..... but I would really like to see this in a "getwalletinfo" RPC. getinfo is too much of a kitchen sink, and considering current (disable-wallet) and proposed (wallet-as-separate-binary) splits between blockchain engine and wallet, adding more wallet data export from getinfo seems undesirable.

  3. djpnewton commented at 5:48 AM on February 21, 2014: contributor

    fair point

  4. laanwj commented at 6:47 AM on February 21, 2014: member

    I don't care about the transaction count myself but ACK for adding getwalletinfo

  5. jgarzik commented at 7:02 AM on February 21, 2014: contributor

    Good stuff -- you copied over the other wallet datums. ACK code changes... now (a) collapse into a single commit. rebase + git push --force, is one method. (b) get it compiling and tested ;p Pull tester monster is angry for a reason ;p

  6. djpnewton commented at 10:07 AM on February 23, 2014: contributor

    Pull tester seems to be showing weird Unicode characters near my changes in the build log

  7. cozz commented at 10:50 AM on February 23, 2014: contributor
    rpcwallet.cpp:1916: error: conversion from ‘size_t’ to ‘const json_spirit::Value_impl<
    

    Not sure which line this is, but you may try replacing this

    obj.push_back(Pair("txcount",       pwalletMain->mapWallet.size()));
    

    with this

    obj.push_back(Pair("txcount",       (int)pwalletMain->mapWallet.size()));
    
  8. djpnewton commented at 8:43 PM on February 26, 2014: contributor

    thanks guys, anything else I need to do here?

  9. move wallet info stuff to "getwalletinfo" rpc (left original wallet
    stuff in getinfo call for backwards compatibility)
    
    add wallet transaction count to getwalletinfo rpc call
    a00ebb5117
  10. in src/rpcwallet.cpp:None in 022fd39331 outdated
    1912 | +            + HelpExampleCli("getwalletinfo", "")
    1913 | +            + HelpExampleRpc("getwalletinfo", "")
    1914 | +        );
    1915 | +
    1916 | +    proxyType proxy;
    1917 | +    GetProxy(NET_IPV4, proxy);
    


    cozz commented at 8:58 PM on February 26, 2014:

    Why are these 2 lines needed?


    Diapolo commented at 10:02 PM on February 26, 2014:

    Seems they are from getinfo... and shouldn't be needed here.


    djpnewton commented at 1:51 AM on February 27, 2014:

    oops, good spotting.. yeah just a leftover

  11. BitcoinPullTester commented at 2:11 AM on February 27, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/a00ebb51176d229683d36cd02a8a26fd63a471a8 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.

  12. laanwj added this to the milestone 0.10.0 on Mar 5, 2014
  13. sipa commented at 3:50 PM on March 10, 2014: member

    ACK

  14. jgarzik referenced this in commit a63f8b7b36 on Mar 10, 2014
  15. jgarzik merged this on Mar 10, 2014
  16. jgarzik closed this on Mar 10, 2014

  17. 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 18:16 UTC

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