Pages:
Author

Topic: [PATCH] implement 'xlisttransactions' - page 4. (Read 21687 times)

full member
Activity: 210
Merit: 104
July 29, 2010, 06:38:49 PM
#5
Very nice! Send Satoshi an email and ask him to add it to trunk.

By the way, anyone having trouble applying this on unix can use:
Code:
curl http://pastebin.ca/raw/1911295 | awk 'sub("$", "\r")' | patch
That'll make the line endings on the removed parts match the Windows line endings in the code files.
legendary
Activity: 1596
Merit: 1091
July 29, 2010, 05:22:06 PM
#4

Added a couple small cleanups, and verified it still works under 0.3.6 / SVN r119.

Version 5 of listtransactions: http://pastebin.ca/1911295
Raw patch: http://pastebin.ca/raw/1911295


FAQ:

Q1) How does 'listtransactions' behave if tail of the block chain changes, eg. 0 confirmations -> 1 confirmation -> 0 confirmations?

A1) 'listtransactions' behaves the same way 'listreceivedbyaddress' behaves...  the output changes accordingly.

legendary
Activity: 1596
Merit: 1091
July 28, 2010, 11:00:24 PM
#3

OK, here's version 4.  Output now matches what you see in the UI, and gives you information on debits/credit/generated/etc.  The 'count' and 'includegenerated' parameters are now honored.

Patch: http://pastebin.ca/1910623
Raw patch: http://pastebin.ca/raw/1910623

Here's sample output from my dev box:
Code:
$ /usr/local/src/bitcoin/bitcoind -datadir=/usr/local/bitcoin/data listtransactions
[
    {
        "address" : "15uyjNbNzizz5r8UgWpF1ZayV82Pq3FHQ5",
        "label" : "",
        "class" : "credit",
        "amount" : 0.02000000000000000,
        "confirmations" : 160
    },
    {
        "address" : "15uyjNbNzizz5r8UgWpF1ZayV82Pq3FHQ5",
        "label" : "",
        "class" : "credit",
        "amount" : 0.01000000000000000,
        "confirmations" : 162
    },
    {
        "address" : "1GKgKYtV79jYHR2mr1SSDp9EjXQuLTmUTw",
        "label" : "",
        "class" : "debit",
        "amount" : 0.02000000000000000,
        "confirmations" : 1525
    },
    {
        "address" : "191ALqREPdXCGE6mhfS7HqRZCeQB2AHT6y",
        "label" : "",
        "class" : "credit",
        "amount" : 0.02000000000000000,
        "confirmations" : 1531
    },
    {
        "address" : "1HVYQQ5K489fMx5Aqt48M5oTJPsmUhrpkx",
        "label" : "",
        "class" : "debit",
        "amount" : 0.01000000000000000,
        "confirmations" : 1572
    },
    {
        "address" : "1KTpPjGWyhTBC5NNYFwNzkyjW6UDL9jKPG",
        "label" : "Your Address",
        "class" : "credit",
        "amount" : 0.01000000000000000,
        "confirmations" : 1587
    }
]
legendary
Activity: 1596
Merit: 1091
July 28, 2010, 08:48:34 PM
#2

Here's an updated version, that sorts by number of confirmations:  http://pastebin.ca/1910564

Raw patch:  http://pastebin.ca/raw/1910564

legendary
Activity: 1596
Merit: 1091
July 28, 2010, 08:34:53 PM
#1
Here is a patch against SVN 117, implementing 'xlisttransactions' RPC: http://pastebin.ca/1910553   At present, the options are ignored, and it dumps all transactions it finds.

Raw patch: http://pastebin.ca/raw/1910553

Edit: Patch's current home is http://yyz.us/bitcoin/patch.bitcoin-listtransactions

Edit2: RPC command has been renamed to 'xlisttransactions'

Pages:
Jump to: