From 9ab659cda362def8e88b44381185cd74a33910cc Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Thu, 4 Sep 2014 20:54:07 +0530 Subject: [PATCH] Added tx ids to ListReceivedByAddress result --- rpcserver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpcserver.go b/rpcserver.go index 5a0666d..9fcf8d1 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2043,6 +2043,8 @@ func ListReceivedByAddress(w *Wallet, chainSvr *chain.Client, icmd btcjson.Cmd) amount btcutil.Amount // Number of confirmations of the last transaction. confirmations int32 + // Hashes of transactions which include an output paying to the address + tx []string } bs, err := w.SyncedChainTip() @@ -2085,6 +2087,7 @@ func ListReceivedByAddress(w *Wallet, chainSvr *chain.Client, icmd btcjson.Cmd) confirmations: confirmations, } } + addrData.tx = append(addrData.tx, credit.Tx().Sha().String()) allAddrData[addrStr] = addrData } } @@ -2100,6 +2103,7 @@ func ListReceivedByAddress(w *Wallet, chainSvr *chain.Client, icmd btcjson.Cmd) Address: address, Amount: addrData.amount.ToUnit(btcutil.AmountBTC), Confirmations: uint64(addrData.confirmations), + Tx: addrData.tx, } idx++ }