Add listreceivedbyaccount concrete result.

ok @jcvernaleo.
This commit is contained in:
Dave Collins 2014-04-23 15:42:29 -05:00
parent 1349f96d8e
commit 4595c9d90d
2 changed files with 17 additions and 3 deletions

View file

@ -279,6 +279,14 @@ type SignRawTransactionResult struct {
Complete bool `json:"complete"`
}
// ListReceivedByAccountResult models the data from the listreceivedbyaccount
// command.
type ListReceivedByAccountResult struct {
Account string `json: "account"`
Amount float64 `json:"amount"`
Confirmations uint64 `json:"confirmations"`
}
// ListSinceBlockResult models the data from the listsinceblock command.
type ListSinceBlockResult struct {
Transactions []ListTransactionsResult `json:"transactions"`
@ -507,6 +515,12 @@ func ReadResultCmd(cmd string, message []byte) (Reply, error) {
if err == nil {
result.Result = res
}
case "listreceivedbyaccount":
var res []ListReceivedByAccountResult
err = json.Unmarshal(objmap["result"], &res)
if err == nil {
result.Result = res
}
case "listsinceblock":
var res ListSinceBlockResult
err = json.Unmarshal(objmap["result"], &res)

View file

@ -436,12 +436,12 @@ github.com/conformal/btcjson/jsoncmd.go VerifyMessageCmd.UnmarshalJSON 68.42
github.com/conformal/btcjson/jsoncmd.go SignRawTransactionCmd.MarshalJSON 66.67% (8/12)
github.com/conformal/btcjson/jsoncmd.go NewLockUnspentCmd 66.67% (4/6)
github.com/conformal/btcjson/jsoncmd.go NewAddNodeCmd 66.67% (2/3)
github.com/conformal/btcjson/jsoncmd.go GetBlockCmd.MarshalJSON 63.64% (7/11)
github.com/conformal/btcjson/jsonfxns.go jsonRpcSend 62.50% (10/16)
github.com/conformal/btcjson/jsonapi.go rpcCommand 61.54% (8/13)
github.com/conformal/btcjson/jsoncmd.go GetBlockCmd.MarshalJSON 60.00% (6/10)
github.com/conformal/btcjson/jsoncmd.go GetTxOutCmd.UnmarshalJSON 59.09% (13/22)
github.com/conformal/btcjson/jsonresults.go ReadResultCmd 58.62% (85/145)
github.com/conformal/btcjson/jsoncmd.go LockUnspentCmd.UnmarshalJSON 57.89% (11/19)
github.com/conformal/btcjson/jsonresults.go ReadResultCmd 57.05% (85/149)
github.com/conformal/btcjson/jsonapi.go rpcRawCommand 53.33% (8/15)
github.com/conformal/btcjson/jsoncmd.go GetBlockCmd.UnmarshalJSON 50.00% (12/24)
github.com/conformal/btcjson/cmdhelp.go GetHelpString 50.00% (3/6)
@ -462,5 +462,5 @@ github.com/conformal/btcjson/jsoncmd.go unparsableCmd.Method 0.00% (0/1)
github.com/conformal/btcjson/jsonapi.go TlsRpcRawCommand 0.00% (0/1)
github.com/conformal/btcjson/jsonapi.go RpcRawCommand 0.00% (0/1)
github.com/conformal/btcjson/jsonresults.go Vin.IsCoinBase 0.00% (0/1)
github.com/conformal/btcjson --------------------------------------- 78.48% (2349/2993)
github.com/conformal/btcjson --------------------------------------- 78.37% (2348/2996)