diff --git a/jsoncmd.go b/jsoncmd.go index 1cd8c4dd..9196629b 100644 --- a/jsoncmd.go +++ b/jsoncmd.go @@ -4853,9 +4853,10 @@ func (cmd *ListTransactionsCmd) UnmarshalJSON(b []byte) error { // ListUnspentCmd is a type handling custom marshaling and // unmarshaling of listunspent JSON RPC commands. type ListUnspentCmd struct { - id interface{} - MinConf int - MaxConf int + id interface{} + MinConf int + MaxConf int + Addresses []string } // Enforce that ListUnspentCmd satisifies the Cmd interface. @@ -4863,23 +4864,40 @@ var _ Cmd = &ListUnspentCmd{} // NewListUnspentCmd creates a new ListUnspentCmd. Optionally a // pointer to a TemplateRequest may be provided. -func NewListUnspentCmd(id interface{}, optArgs ...int) (*ListUnspentCmd, error) { +func NewListUnspentCmd(id interface{}, optArgs ...interface{}) (*ListUnspentCmd, error) { minconf := 1 maxconf := 999999 + var addresses []string - if len(optArgs) > 2 { + if len(optArgs) > 3 { return nil, ErrWrongNumberOfParams } if len(optArgs) > 0 { - minconf = optArgs[0] + m, ok := optArgs[0].(int) + if !ok { + return nil, errors.New("first optional argument minconf is not an int") + } + minconf = m } if len(optArgs) > 1 { - maxconf = optArgs[1] + m, ok := optArgs[1].(int) + if !ok { + return nil, errors.New("second optional argument maxconf is not an int") + } + maxconf = m + } + if len(optArgs) > 2 { + a, ok := optArgs[2].([]string) + if !ok { + return nil, errors.New("third optional argument addresses is not an array of strings") + } + addresses = a } return &ListUnspentCmd{ - id: id, - MinConf: minconf, - MaxConf: maxconf, + id: id, + MinConf: minconf, + MaxConf: maxconf, + Addresses: addresses, }, nil } @@ -4907,14 +4925,18 @@ func (cmd *ListUnspentCmd) MarshalJSON() ([]byte, error) { Params: []interface{}{}, } - if cmd.MinConf != 1 || cmd.MaxConf != 99999 { + if cmd.MinConf != 1 || cmd.MaxConf != 99999 || len(cmd.Addresses) != 0 { raw.Params = append(raw.Params, cmd.MinConf) } - if cmd.MaxConf != 99999 { + if cmd.MaxConf != 99999 || len(cmd.Addresses) != 0 { raw.Params = append(raw.Params, cmd.MaxConf) } + if len(cmd.Addresses) != 0 { + raw.Params = append(raw.Params, cmd.Addresses) + } + return json.Marshal(raw) } @@ -4927,11 +4949,11 @@ func (cmd *ListUnspentCmd) UnmarshalJSON(b []byte) error { return err } - if len(r.Params) > 2 { + if len(r.Params) > 3 { return ErrWrongNumberOfParams } - optArgs := make([]int, 0, 2) + optArgs := make([]interface{}, 0, 3) if len(r.Params) > 0 { minconf, ok := r.Params[0].(float64) if !ok { @@ -4946,6 +4968,22 @@ func (cmd *ListUnspentCmd) UnmarshalJSON(b []byte) error { } optArgs = append(optArgs, int(maxconf)) } + if len(r.Params) > 2 { + iaddr, ok := r.Params[2].([]interface{}) + if !ok { + return errors.New("third optional parameter addresses must be an array") + } + + addr := make([]string, len(iaddr)) + for i, val := range iaddr { + addr[i], ok = val.(string) + if !ok { + return errors.New("optional parameter addreses must be an array of strings") + } + } + + optArgs = append(optArgs, addr) + } newCmd, err := NewListUnspentCmd(r.Id, optArgs...) if err != nil { diff --git a/jsoncmd_test.go b/jsoncmd_test.go index de21a4ba..9be151d7 100644 --- a/jsoncmd_test.go +++ b/jsoncmd_test.go @@ -1060,6 +1060,21 @@ var jsoncmdtests = []struct { MaxConf: 6, }, }, + { + name: "basic + opts + addresses", + cmd: "listunspent", + f: func() (Cmd, error) { + return NewListUnspentCmd(testId, 0, 6, []string{ + "a", "b", "c", + }) + }, + result: &ListUnspentCmd{ + id: testId, + MinConf: 0, + MaxConf: 6, + Addresses: []string{"a", "b", "c"}, + }, + }, { name: "basic", cmd: "lockunspent", diff --git a/test_coverage.txt b/test_coverage.txt index f7af2f9f..cc9e128b 100644 --- a/test_coverage.txt +++ b/test_coverage.txt @@ -3,54 +3,54 @@ github.com/conformal/btcjson/jsonapi.go JSONToAmount 100.00% (15/15) github.com/conformal/btcjson/jsonapi.go JSONGetMethod 100.00% (14/14) github.com/conformal/btcjson/jsoncmd.go SendManyCmd.MarshalJSON 100.00% (9/9) github.com/conformal/btcjson/jsoncmd.go SendFromCmd.MarshalJSON 100.00% (8/8) +github.com/conformal/btcjson/jsoncmd.go ListUnspentCmd.MarshalJSON 100.00% (8/8) github.com/conformal/btcjson/jsoncmd.go ListTransactionsCmd.MarshalJSON 100.00% (8/8) github.com/conformal/btcjson/jsonfxns.go MarshallAndSend 100.00% (7/7) -github.com/conformal/btcjson/jsoncmd.go ListSinceBlockCmd.MarshalJSON 100.00% (6/6) -github.com/conformal/btcjson/jsoncmd.go ListUnspentCmd.MarshalJSON 100.00% (6/6) -github.com/conformal/btcjson/jsonfxns.go GetRaw 100.00% (6/6) -github.com/conformal/btcjson/jsoncmd.go GetReceivedByAccountCmd.MarshalJSON 100.00% (6/6) -github.com/conformal/btcjson/jsoncmd.go GetReceivedByAddressCmd.MarshalJSON 100.00% (6/6) -github.com/conformal/btcjson/jsoncmd.go MoveCmd.MarshalJSON 100.00% (6/6) -github.com/conformal/btcjson/jsoncmd.go GetBalanceCmd.MarshalJSON 100.00% (6/6) -github.com/conformal/btcjson/jsoncmd.go VerifyChainCmd.MarshalJSON 100.00% (6/6) -github.com/conformal/btcjson/jsoncmd.go ListReceivedByAddressCmd.MarshalJSON 100.00% (6/6) -github.com/conformal/btcjson/jsoncmd.go ImportPrivKeyCmd.MarshalJSON 100.00% (6/6) github.com/conformal/btcjson/jsoncmd.go GetNetworkHashPSCmd.MarshalJSON 100.00% (6/6) -github.com/conformal/btcjson/jsoncmd.go ListReceivedByAccountCmd.MarshalJSON 100.00% (6/6) github.com/conformal/btcjson/jsoncmd.go SendToAddressCmd.MarshalJSON 100.00% (6/6) +github.com/conformal/btcjson/jsoncmd.go ImportPrivKeyCmd.MarshalJSON 100.00% (6/6) +github.com/conformal/btcjson/jsoncmd.go ListReceivedByAccountCmd.MarshalJSON 100.00% (6/6) +github.com/conformal/btcjson/jsoncmd.go MoveCmd.MarshalJSON 100.00% (6/6) +github.com/conformal/btcjson/jsoncmd.go GetReceivedByAddressCmd.MarshalJSON 100.00% (6/6) +github.com/conformal/btcjson/jsoncmd.go GetReceivedByAccountCmd.MarshalJSON 100.00% (6/6) +github.com/conformal/btcjson/jsoncmd.go VerifyChainCmd.MarshalJSON 100.00% (6/6) +github.com/conformal/btcjson/jsoncmd.go GetBalanceCmd.MarshalJSON 100.00% (6/6) +github.com/conformal/btcjson/jsoncmd.go ListReceivedByAddressCmd.MarshalJSON 100.00% (6/6) +github.com/conformal/btcjson/jsonfxns.go GetRaw 100.00% (6/6) +github.com/conformal/btcjson/jsoncmd.go ListSinceBlockCmd.MarshalJSON 100.00% (6/6) github.com/conformal/btcjson/jsonapi.go jsonWithArgs 100.00% (5/5) -github.com/conformal/btcjson/jsoncmd.go GetAddedNodeInfoCmd.MarshalJSON 100.00% (4/4) -github.com/conformal/btcjson/jsoncmd.go ListAccountsCmd.MarshalJSON 100.00% (4/4) -github.com/conformal/btcjson/jsoncmd.go GetRawTransactionCmd.MarshalJSON 100.00% (4/4) github.com/conformal/btcjson/jsoncmd.go SetGenerateCmd.MarshalJSON 100.00% (4/4) -github.com/conformal/btcjson/jsoncmd.go GetRawMempoolCmd.MarshalJSON 100.00% (4/4) github.com/conformal/btcjson/jsoncmd.go GetRawChangeAddressCmd.MarshalJSON 100.00% (4/4) -github.com/conformal/btcjson/jsoncmd.go AddMultisigAddressCmd.MarshalJSON 100.00% (4/4) -github.com/conformal/btcjson/jsoncmd.go SubmitBlockCmd.MarshalJSON 100.00% (4/4) -github.com/conformal/btcjson/jsoncmd.go CreateRawTransactionCmd.MarshalJSON 100.00% (4/4) -github.com/conformal/btcjson/jsoncmd.go HelpCmd.MarshalJSON 100.00% (4/4) -github.com/conformal/btcjson/jsoncmd.go GetBlockTemplateCmd.MarshalJSON 100.00% (4/4) github.com/conformal/btcjson/jsoncmd.go GetNewAddressCmd.MarshalJSON 100.00% (4/4) +github.com/conformal/btcjson/jsoncmd.go GetRawTransactionCmd.MarshalJSON 100.00% (4/4) +github.com/conformal/btcjson/jsoncmd.go HelpCmd.MarshalJSON 100.00% (4/4) +github.com/conformal/btcjson/jsoncmd.go ListAccountsCmd.MarshalJSON 100.00% (4/4) +github.com/conformal/btcjson/jsoncmd.go CreateRawTransactionCmd.MarshalJSON 100.00% (4/4) +github.com/conformal/btcjson/jsoncmd.go AddMultisigAddressCmd.MarshalJSON 100.00% (4/4) +github.com/conformal/btcjson/jsoncmd.go GetRawMempoolCmd.MarshalJSON 100.00% (4/4) +github.com/conformal/btcjson/jsoncmd.go GetAddedNodeInfoCmd.MarshalJSON 100.00% (4/4) +github.com/conformal/btcjson/jsoncmd.go SubmitBlockCmd.MarshalJSON 100.00% (4/4) +github.com/conformal/btcjson/jsoncmd.go GetBlockTemplateCmd.MarshalJSON 100.00% (4/4) github.com/conformal/btcjson/jsonapi.go IsValidIdType 100.00% (3/3) -github.com/conformal/btcjson/jsoncmd.go SetAccountCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go ListLockUnspentCmd.MarshalJSON 100.00% (2/2) github.com/conformal/btcjson/jsoncmd.go PingCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go SendRawTransactionCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go WalletPassphraseChangeCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsonapi.go CreateMessage 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go VerifyMessageCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go SetTxFeeCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go GetWorkCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go GetTxOutSetInfoCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go ImportWalletCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go WalletPassphraseCmd.MarshalJSON 100.00% (2/2) github.com/conformal/btcjson/jsoncmd.go GetTransactionCmd.MarshalJSON 100.00% (2/2) github.com/conformal/btcjson/jsoncmd.go ListAddressGroupingsCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go ListLockUnspentCmd.MarshalJSON 100.00% (2/2) github.com/conformal/btcjson/jsoncmd.go WalletLockCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go GetTxOutSetInfoCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go StopCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go ValidateAddressCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go SetAccountCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go VerifyMessageCmd.MarshalJSON 100.00% (2/2) github.com/conformal/btcjson/jsoncmd.go SignMessageCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go GetWorkCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go SetTxFeeCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go ValidateAddressCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go SendRawTransactionCmd.MarshalJSON 100.00% (2/2) github.com/conformal/btcjson/jsoncmd.go KeyPoolRefillCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go WalletPassphraseCmd.MarshalJSON 100.00% (2/2) -github.com/conformal/btcjson/jsoncmd.go ImportWalletCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go StopCmd.MarshalJSON 100.00% (2/2) +github.com/conformal/btcjson/jsonapi.go CreateMessage 100.00% (2/2) +github.com/conformal/btcjson/jsoncmd.go WalletPassphraseChangeCmd.MarshalJSON 100.00% (2/2) github.com/conformal/btcjson/jsoncmd.go EncryptWalletCmd.Method 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go EncryptWalletCmd.MarshalJSON 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go NewGetAccountCmd 100.00% (1/1) @@ -70,7 +70,6 @@ github.com/conformal/btcjson/jsoncmd.go NewGetAddressesByAccountCmd 100.00% ( github.com/conformal/btcjson/jsoncmd.go GetAddressesByAccountCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetAddressesByAccountCmd.SetId 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetAddressesByAccountCmd.Method 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go GetAddressesByAccountCmd.MarshalJSON 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetBalanceCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetBalanceCmd.SetId 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetBalanceCmd.Method 100.00% (1/1) @@ -87,12 +86,7 @@ github.com/conformal/btcjson/jsoncmd.go GetBlockCountCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetBlockCountCmd.SetId 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetBlockCountCmd.Method 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetBlockCountCmd.MarshalJSON 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go NewGetBlockHashCmd 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.Id 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.SetId 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.Method 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.MarshalJSON 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go MoveCmd.SetId 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go GetAddressesByAccountCmd.MarshalJSON 100.00% (1/1) github.com/conformal/btcjson/jsonapi.go Error.Error 100.00% (1/1) github.com/conformal/btcjson/jsonapi.go RpcCommand 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go AddMultisigAddressCmd.Id 100.00% (1/1) @@ -144,6 +138,8 @@ github.com/conformal/btcjson/jsoncmd.go DumpWalletCmd.MarshalJSON 100.00% (1/ github.com/conformal/btcjson/jsoncmd.go NewEncryptWalletCmd 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go EncryptWalletCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go EncryptWalletCmd.SetId 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go GetReceivedByAddressCmd.SetId 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go GetReceivedByAddressCmd.Method 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go NewGetTransactionCmd 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetTransactionCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetTransactionCmd.SetId 100.00% (1/1) @@ -172,8 +168,6 @@ github.com/conformal/btcjson/jsoncmd.go ImportWalletCmd.Method 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go NewKeyPoolRefillCmd 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go KeyPoolRefillCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go KeyPoolRefillCmd.SetId 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go KeyPoolRefillCmd.Method 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go GetReceivedByAccountCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go ListAccountsCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go ListAccountsCmd.SetId 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go ListAccountsCmd.Method 100.00% (1/1) @@ -270,6 +264,12 @@ github.com/conformal/btcjson/jsoncmd.go NewWalletPassphraseChangeCmd 100.00% github.com/conformal/btcjson/jsoncmd.go WalletPassphraseChangeCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go WalletPassphraseChangeCmd.SetId 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go WalletPassphraseChangeCmd.Method 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go MoveCmd.SetId 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go NewGetBlockHashCmd 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.Id 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.SetId 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.Method 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.MarshalJSON 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetBlockTemplateCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetBlockTemplateCmd.SetId 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetBlockTemplateCmd.Method 100.00% (1/1) @@ -292,6 +292,7 @@ github.com/conformal/btcjson/jsoncmd.go NewGetHashesPerSecCmd 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetHashesPerSecCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetHashesPerSecCmd.SetId 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetHashesPerSecCmd.Method 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go GetHashesPerSecCmd.MarshalJSON 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go NewGetInfoCmd 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetInfoCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetInfoCmd.SetId 100.00% (1/1) @@ -327,66 +328,65 @@ github.com/conformal/btcjson/jsoncmd.go GetRawMempoolCmd.Method 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetRawTransactionCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetRawTransactionCmd.SetId 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetRawTransactionCmd.Method 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go GetHashesPerSecCmd.MarshalJSON 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go KeyPoolRefillCmd.Method 100.00% (1/1) +github.com/conformal/btcjson/jsoncmd.go GetReceivedByAccountCmd.Id 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetReceivedByAccountCmd.SetId 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetReceivedByAccountCmd.Method 100.00% (1/1) github.com/conformal/btcjson/jsoncmd.go GetReceivedByAddressCmd.Id 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go GetReceivedByAddressCmd.SetId 100.00% (1/1) -github.com/conformal/btcjson/jsoncmd.go GetReceivedByAddressCmd.Method 100.00% (1/1) github.com/conformal/btcjson/jsonapi.go CreateMessageWithId 96.18% (327/340) github.com/conformal/btcjson/jsoncmd.go ParseMarshaledCmd 91.86% (79/86) -github.com/conformal/btcjson/jsoncmd.go NewGetNetworkHashPSCmd 88.89% (8/9) github.com/conformal/btcjson/jsoncmd.go NewVerifyChainCmd 88.89% (8/9) -github.com/conformal/btcjson/jsoncmd.go NewListUnspentCmd 88.89% (8/9) +github.com/conformal/btcjson/jsoncmd.go NewGetNetworkHashPSCmd 88.89% (8/9) github.com/conformal/btcjson/jsonapi.go ReadResultCmd 88.00% (66/75) -github.com/conformal/btcjson/jsoncmd.go NewGetRawTransactionCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewGetTxOutCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewGetRawMempoolCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewSubmitBlockCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewGetAddedNodeInfoCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewListAccountsCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewAddMultisigAddressCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewSetGenerateCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewGetNewAddressCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewGetRawChangeAddressCmd 83.33% (5/6) -github.com/conformal/btcjson/jsoncmd.go NewGetBlockTemplateCmd 83.33% (5/6) github.com/conformal/btcjson/jsoncmd.go NewHelpCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewGetNewAddressCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewListAccountsCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewGetRawChangeAddressCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewGetRawTransactionCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewSubmitBlockCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewAddMultisigAddressCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewGetRawMempoolCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewSetGenerateCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewGetAddedNodeInfoCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewGetTxOutCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewGetBlockTemplateCmd 83.33% (5/6) +github.com/conformal/btcjson/jsoncmd.go NewListUnspentCmd 80.95% (17/21) github.com/conformal/btcjson/jsoncmd.go NewSendFromCmd 80.95% (17/21) github.com/conformal/btcjson/jsoncmd.go NewListTransactionsCmd 80.95% (17/21) -github.com/conformal/btcjson/jsoncmd.go NewSendToAddressCmd 80.00% (12/15) -github.com/conformal/btcjson/jsoncmd.go NewMoveCmd 80.00% (12/15) -github.com/conformal/btcjson/jsoncmd.go NewGetReceivedByAddressCmd 80.00% (12/15) -github.com/conformal/btcjson/jsoncmd.go NewGetBalanceCmd 80.00% (12/15) -github.com/conformal/btcjson/jsoncmd.go NewGetReceivedByAccountCmd 80.00% (12/15) -github.com/conformal/btcjson/jsoncmd.go NewSendManyCmd 80.00% (12/15) github.com/conformal/btcjson/jsoncmd.go NewListSinceBlockCmd 80.00% (12/15) +github.com/conformal/btcjson/jsoncmd.go NewSendToAddressCmd 80.00% (12/15) +github.com/conformal/btcjson/jsoncmd.go NewGetReceivedByAddressCmd 80.00% (12/15) +github.com/conformal/btcjson/jsoncmd.go NewGetReceivedByAccountCmd 80.00% (12/15) github.com/conformal/btcjson/jsoncmd.go NewListReceivedByAddressCmd 80.00% (12/15) +github.com/conformal/btcjson/jsoncmd.go NewMoveCmd 80.00% (12/15) +github.com/conformal/btcjson/jsoncmd.go NewGetBalanceCmd 80.00% (12/15) +github.com/conformal/btcjson/jsoncmd.go NewSendManyCmd 80.00% (12/15) github.com/conformal/btcjson/jsoncmd.go NewListReceivedByAccountCmd 80.00% (12/15) github.com/conformal/btcjson/jsoncmd.go GetBlockTemplateCmd.UnmarshalJSON 79.41% (27/34) github.com/conformal/btcjson/jsoncmd.go NewImportPrivKeyCmd 78.57% (11/14) -github.com/conformal/btcjson/jsoncmd.go ListTransactionsCmd.UnmarshalJSON 76.92% (20/26) +github.com/conformal/btcjson/jsoncmd.go ListUnspentCmd.UnmarshalJSON 77.42% (24/31) github.com/conformal/btcjson/jsoncmd.go SubmitBlockCmd.UnmarshalJSON 76.92% (20/26) -github.com/conformal/btcjson/jsoncmd.go GetReceivedByAddressCmd.UnmarshalJSON 76.19% (16/21) +github.com/conformal/btcjson/jsoncmd.go ListTransactionsCmd.UnmarshalJSON 76.92% (20/26) github.com/conformal/btcjson/jsoncmd.go VerifyChainCmd.UnmarshalJSON 76.19% (16/21) -github.com/conformal/btcjson/jsoncmd.go GetNetworkHashPSCmd.UnmarshalJSON 76.19% (16/21) -github.com/conformal/btcjson/jsoncmd.go ListReceivedByAccountCmd.UnmarshalJSON 76.19% (16/21) -github.com/conformal/btcjson/jsoncmd.go ListReceivedByAddressCmd.UnmarshalJSON 76.19% (16/21) +github.com/conformal/btcjson/jsoncmd.go GetReceivedByAccountCmd.UnmarshalJSON 76.19% (16/21) github.com/conformal/btcjson/jsoncmd.go ListSinceBlockCmd.UnmarshalJSON 76.19% (16/21) github.com/conformal/btcjson/jsoncmd.go GetBalanceCmd.UnmarshalJSON 76.19% (16/21) -github.com/conformal/btcjson/jsoncmd.go GetReceivedByAccountCmd.UnmarshalJSON 76.19% (16/21) -github.com/conformal/btcjson/jsoncmd.go ListUnspentCmd.UnmarshalJSON 76.19% (16/21) +github.com/conformal/btcjson/jsoncmd.go ListReceivedByAddressCmd.UnmarshalJSON 76.19% (16/21) +github.com/conformal/btcjson/jsoncmd.go ListReceivedByAccountCmd.UnmarshalJSON 76.19% (16/21) +github.com/conformal/btcjson/jsoncmd.go GetReceivedByAddressCmd.UnmarshalJSON 76.19% (16/21) +github.com/conformal/btcjson/jsoncmd.go GetNetworkHashPSCmd.UnmarshalJSON 76.19% (16/21) github.com/conformal/btcjson/jsoncmd.go SendManyCmd.UnmarshalJSON 75.00% (27/36) github.com/conformal/btcjson/jsoncmd.go ImportPrivKeyCmd.UnmarshalJSON 75.00% (18/24) -github.com/conformal/btcjson/jsoncmd.go HelpCmd.UnmarshalJSON 75.00% (12/16) github.com/conformal/btcjson/jsoncmd.go GetRawChangeAddressCmd.UnmarshalJSON 75.00% (12/16) -github.com/conformal/btcjson/jsoncmd.go GetNewAddressCmd.UnmarshalJSON 75.00% (12/16) +github.com/conformal/btcjson/jsoncmd.go HelpCmd.UnmarshalJSON 75.00% (12/16) github.com/conformal/btcjson/jsoncmd.go ListAccountsCmd.UnmarshalJSON 75.00% (12/16) +github.com/conformal/btcjson/jsoncmd.go GetNewAddressCmd.UnmarshalJSON 75.00% (12/16) github.com/conformal/btcjson/jsoncmd.go GetRawMempoolCmd.UnmarshalJSON 75.00% (12/16) -github.com/conformal/btcjson/jsoncmd.go LockUnspentCmd.MarshalJSON 75.00% (3/4) github.com/conformal/btcjson/jsoncmd.go GetTxOutCmd.MarshalJSON 75.00% (3/4) +github.com/conformal/btcjson/jsoncmd.go LockUnspentCmd.MarshalJSON 75.00% (3/4) github.com/conformal/btcjson/jsoncmd.go SendFromCmd.UnmarshalJSON 73.68% (28/38) -github.com/conformal/btcjson/jsoncmd.go GetRawTransactionCmd.UnmarshalJSON 73.68% (14/19) github.com/conformal/btcjson/jsoncmd.go SetGenerateCmd.UnmarshalJSON 73.68% (14/19) +github.com/conformal/btcjson/jsoncmd.go GetRawTransactionCmd.UnmarshalJSON 73.68% (14/19) github.com/conformal/btcjson/jsoncmd.go GetWorkCmd.UnmarshalJSON 73.53% (25/34) github.com/conformal/btcjson/jsoncmd.go SendToAddressCmd.UnmarshalJSON 73.33% (22/30) github.com/conformal/btcjson/jsoncmd.go AddMultisigAddressCmd.UnmarshalJSON 73.08% (19/26) @@ -394,45 +394,45 @@ github.com/conformal/btcjson/jsoncmd.go MoveCmd.UnmarshalJSON 72.73% (24/33) github.com/conformal/btcjson/jsoncmd.go ConvertCreateRawTxParams 72.22% (26/36) github.com/conformal/btcjson/jsoncmd.go GetAddedNodeInfoCmd.UnmarshalJSON 72.22% (13/18) github.com/conformal/btcjson/jsoncmd.go CreateMultisigCmd.UnmarshalJSON 71.43% (15/21) -github.com/conformal/btcjson/jsoncmd.go GetMiningInfoCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go ListLockUnspentCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go GetNetTotalsCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go GetHashesPerSecCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go WalletLockCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go GetBlockCountCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go GetPeerInfoCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go GetGenerateCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go StopCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go KeyPoolRefillCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go GetBestBlockHashCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go GetDifficultyCmd.UnmarshalJSON 70.00% (7/10) github.com/conformal/btcjson/jsoncmd.go GetConnectionCountCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go PingCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go ListLockUnspentCmd.UnmarshalJSON 70.00% (7/10) github.com/conformal/btcjson/jsoncmd.go GetTxOutSetInfoCmd.UnmarshalJSON 70.00% (7/10) github.com/conformal/btcjson/jsoncmd.go GetInfoCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go GetHashesPerSecCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go GetNetTotalsCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go GetPeerInfoCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go KeyPoolRefillCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go GetBestBlockHashCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go GetMiningInfoCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go GetBlockCountCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go StopCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go GetDifficultyCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go GetGenerateCmd.UnmarshalJSON 70.00% (7/10) github.com/conformal/btcjson/jsoncmd.go ListAddressGroupingsCmd.UnmarshalJSON 70.00% (7/10) -github.com/conformal/btcjson/jsoncmd.go ImportWalletCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go WalletLockCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go PingCmd.UnmarshalJSON 70.00% (7/10) +github.com/conformal/btcjson/jsoncmd.go DumpWalletCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go DebugLevelCmd.UnmarshalJSON 69.23% (9/13) github.com/conformal/btcjson/jsoncmd.go GetAccountAddressCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go SendRawTransactionCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go CreateRawTransactionCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go GetAccountCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go DecodeScriptCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go ValidateAddressCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go GetTransactionCmd.UnmarshalJSON 69.23% (9/13) github.com/conformal/btcjson/jsoncmd.go DecodeRawTransactionCmd.UnmarshalJSON 69.23% (9/13) github.com/conformal/btcjson/jsoncmd.go BackupWalletCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go CreateRawTransactionCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go DebugLevelCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go SendRawTransactionCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go DumpPrivKeyCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go DumpWalletCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go EncryptWalletCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go GetAccountCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go ValidateAddressCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go DecodeScriptCmd.UnmarshalJSON 69.23% (9/13) -github.com/conformal/btcjson/jsoncmd.go GetTransactionCmd.UnmarshalJSON 69.23% (9/13) github.com/conformal/btcjson/jsoncmd.go GetAddressesByAccountCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go EncryptWalletCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go DumpPrivKeyCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go GetBlockHashCmd.UnmarshalJSON 69.23% (9/13) +github.com/conformal/btcjson/jsoncmd.go ImportWalletCmd.UnmarshalJSON 69.23% (9/13) github.com/conformal/btcjson/jsoncmd.go WalletPassphraseCmd.UnmarshalJSON 68.75% (11/16) github.com/conformal/btcjson/jsoncmd.go SetAccountCmd.UnmarshalJSON 68.75% (11/16) -github.com/conformal/btcjson/jsoncmd.go SetTxFeeCmd.UnmarshalJSON 68.75% (11/16) -github.com/conformal/btcjson/jsoncmd.go WalletPassphraseChangeCmd.UnmarshalJSON 68.75% (11/16) github.com/conformal/btcjson/jsoncmd.go AddNodeCmd.UnmarshalJSON 68.75% (11/16) github.com/conformal/btcjson/jsoncmd.go SignMessageCmd.UnmarshalJSON 68.75% (11/16) +github.com/conformal/btcjson/jsoncmd.go SetTxFeeCmd.UnmarshalJSON 68.75% (11/16) +github.com/conformal/btcjson/jsoncmd.go WalletPassphraseChangeCmd.UnmarshalJSON 68.75% (11/16) github.com/conformal/btcjson/jsoncmd.go VerifyMessageCmd.UnmarshalJSON 68.42% (13/19) github.com/conformal/btcjson/jsoncmd.go NewLockUnspentCmd 66.67% (4/6) github.com/conformal/btcjson/jsoncmd.go NewAddNodeCmd 66.67% (2/3) @@ -443,6 +443,7 @@ github.com/conformal/btcjson/jsoncmd.go GetTxOutCmd.UnmarshalJSON 59.09% (13/ github.com/conformal/btcjson/jsoncmd.go GetBlockCmd.MarshalJSON 57.14% (4/7) 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/jsoncmd.go GetHelpString 50.00% (3/6) github.com/conformal/btcjson/jsoncmd.go NewSignRawTransactionCmd 38.10% (8/21) github.com/conformal/btcjson/jsoncmd.go NewGetBlockCmd 36.36% (4/11) github.com/conformal/btcjson/jsoncmd.go LockUnspentCmd.UnmarshalJSON 30.56% (11/36) @@ -450,14 +451,14 @@ github.com/conformal/btcjson/jsoncmd.go SignRawTransactionCmd.UnmarshalJSON 22 github.com/conformal/btcjson/jsoncmd.go unparsableCmd.UnmarshalJSON 0.00% (0/6) github.com/conformal/btcjson/jsonapi.go Vin.MarshalJSON 0.00% (0/5) github.com/conformal/btcjson/jsoncmd.go unparsableCmd.MarshalJSON 0.00% (0/2) -github.com/conformal/btcjson/jsonapi.go TlsRpcCommand 0.00% (0/1) -github.com/conformal/btcjson/jsonapi.go TlsRpcRawCommand 0.00% (0/1) -github.com/conformal/btcjson/jsonapi.go Vin.IsCoinBase 0.00% (0/1) -github.com/conformal/btcjson/jsoncmd.go unparsableCmd.Method 0.00% (0/1) -github.com/conformal/btcjson/jsoncmd.go unparsableCmd.Id 0.00% (0/1) -github.com/conformal/btcjson/jsoncmd.go newUnparsableCmd 0.00% (0/1) -github.com/conformal/btcjson/jsoncmd.go unparsableCmd.SetId 0.00% (0/1) -github.com/conformal/btcjson/jsoncmd.go RegisterCustomCmd 0.00% (0/1) github.com/conformal/btcjson/jsonapi.go RpcRawCommand 0.00% (0/1) -github.com/conformal/btcjson --------------------------------------- 79.38% (2190/2759) +github.com/conformal/btcjson/jsonapi.go Vin.IsCoinBase 0.00% (0/1) +github.com/conformal/btcjson/jsoncmd.go unparsableCmd.SetId 0.00% (0/1) +github.com/conformal/btcjson/jsoncmd.go unparsableCmd.Id 0.00% (0/1) +github.com/conformal/btcjson/jsoncmd.go RegisterCustomCmd 0.00% (0/1) +github.com/conformal/btcjson/jsonapi.go TlsRpcRawCommand 0.00% (0/1) +github.com/conformal/btcjson/jsoncmd.go unparsableCmd.Method 0.00% (0/1) +github.com/conformal/btcjson/jsoncmd.go newUnparsableCmd 0.00% (0/1) +github.com/conformal/btcjson/jsonapi.go TlsRpcCommand 0.00% (0/1) +github.com/conformal/btcjson --------------------------------------- 79.31% (2212/2789)