parent
2731634dda
commit
2be94151a3
2 changed files with 364 additions and 88 deletions
276
cmds_test.go
Normal file
276
cmds_test.go
Normal file
|
@ -0,0 +1,276 @@
|
|||
// Copyright (c) 2013 Conformal Systems LLC.
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// this has to be in the real package so we can mock up structs
|
||||
package btcws
|
||||
|
||||
import (
|
||||
"github.com/conformal/btcdb"
|
||||
"github.com/conformal/btcjson"
|
||||
"github.com/conformal/btcwire"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var cmdtests = []struct {
|
||||
name string
|
||||
f func() (btcjson.Cmd, error)
|
||||
result btcjson.Cmd // after marshal and unmarshal
|
||||
}{
|
||||
{
|
||||
name: "createencryptedwallet",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewCreateEncryptedWalletCmd(
|
||||
float64(1),
|
||||
"abcde",
|
||||
"description",
|
||||
"banana"), nil
|
||||
},
|
||||
result: &CreateEncryptedWalletCmd{
|
||||
id: float64(1),
|
||||
Account: "abcde",
|
||||
Description: "description",
|
||||
Passphrase: "banana",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getaddressbalance no optargs",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewGetAddressBalanceCmd(
|
||||
float64(1),
|
||||
"17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH")
|
||||
},
|
||||
result: &GetAddressBalanceCmd{
|
||||
id: float64(1),
|
||||
Address: "17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH",
|
||||
Minconf: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getaddressbalance one optarg",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewGetAddressBalanceCmd(
|
||||
float64(1),
|
||||
"17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH",
|
||||
0)
|
||||
},
|
||||
result: &GetAddressBalanceCmd{
|
||||
id: float64(1),
|
||||
Address: "17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH",
|
||||
Minconf: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getbalances",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewGetBalancesCmd(float64(1)), nil
|
||||
},
|
||||
result: &GetBalancesCmd{
|
||||
id: float64(1),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getbestblock",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewGetBestBlockCmd(float64(1)), nil
|
||||
},
|
||||
result: &GetBestBlockCmd{
|
||||
id: float64(1),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getcurrentnet",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewGetCurrentNetCmd(float64(1)), nil
|
||||
},
|
||||
result: &GetCurrentNetCmd{
|
||||
id: float64(1),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "listalltransactions no optargs",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewListAllTransactionsCmd(float64(1))
|
||||
},
|
||||
result: &ListAllTransactionsCmd{
|
||||
id: float64(1),
|
||||
Account: "",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "listalltransactions one optarg",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewListAllTransactionsCmd(
|
||||
float64(1),
|
||||
"abcde")
|
||||
},
|
||||
result: &ListAllTransactionsCmd{
|
||||
id: float64(1),
|
||||
Account: "abcde",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "notifynewtxs",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
addrs := []string{
|
||||
"17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH",
|
||||
}
|
||||
return NewNotifyNewTXsCmd(
|
||||
float64(1),
|
||||
addrs), nil
|
||||
},
|
||||
result: &NotifyNewTXsCmd{
|
||||
id: float64(1),
|
||||
Addresses: []string{
|
||||
"17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "notifyspent",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
op := &btcwire.OutPoint{
|
||||
Hash: btcwire.ShaHash{0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
||||
30, 31},
|
||||
Index: 1,
|
||||
}
|
||||
return NewNotifySpentCmd(float64(1), op), nil
|
||||
},
|
||||
result: &NotifySpentCmd{
|
||||
id: float64(1),
|
||||
OutPoint: &btcwire.OutPoint{
|
||||
Hash: btcwire.ShaHash{0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
||||
30, 31},
|
||||
Index: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "rescan no optargs",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
addrs := map[string]struct{}{
|
||||
"17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH": struct{}{},
|
||||
}
|
||||
return NewRescanCmd(
|
||||
float64(1),
|
||||
270000,
|
||||
addrs)
|
||||
},
|
||||
result: &RescanCmd{
|
||||
id: float64(1),
|
||||
BeginBlock: 270000,
|
||||
Addresses: map[string]struct{}{
|
||||
"17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH": struct{}{},
|
||||
},
|
||||
EndBlock: btcdb.AllShas,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "rescan one optarg",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
addrs := map[string]struct{}{
|
||||
"17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH": struct{}{},
|
||||
}
|
||||
return NewRescanCmd(
|
||||
float64(1),
|
||||
270000,
|
||||
addrs,
|
||||
280000)
|
||||
},
|
||||
result: &RescanCmd{
|
||||
id: float64(1),
|
||||
BeginBlock: 270000,
|
||||
Addresses: map[string]struct{}{
|
||||
"17XhEvq9Nahdj7Xe1nv6oRe1tEmaHUuynH": struct{}{},
|
||||
},
|
||||
EndBlock: 280000,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "walletislocked no optargs",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewWalletIsLockedCmd(float64(1))
|
||||
},
|
||||
result: &WalletIsLockedCmd{
|
||||
id: float64(1),
|
||||
Account: "",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "walletislocked one optarg",
|
||||
f: func() (btcjson.Cmd, error) {
|
||||
return NewWalletIsLockedCmd(
|
||||
float64(1),
|
||||
"abcde")
|
||||
},
|
||||
result: &WalletIsLockedCmd{
|
||||
id: float64(1),
|
||||
Account: "abcde",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestCmds(t *testing.T) {
|
||||
for _, test := range cmdtests {
|
||||
c, err := test.f()
|
||||
if err != nil {
|
||||
t.Errorf("%s: failed to run func: %v",
|
||||
test.name, err)
|
||||
continue
|
||||
}
|
||||
|
||||
mc, err := c.MarshalJSON()
|
||||
if err != nil {
|
||||
t.Errorf("%s: failed to marshal cmd: %v",
|
||||
test.name, err)
|
||||
continue
|
||||
}
|
||||
|
||||
c2, err := btcjson.ParseMarshaledCmd(mc)
|
||||
if err != nil {
|
||||
t.Errorf("%s: failed to ummarshal cmd: %v",
|
||||
test.name, err)
|
||||
continue
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(test.result, c2) {
|
||||
t.Errorf("%s: unmarshal not as expected. "+
|
||||
"got %v wanted %v", test.name, spew.Sdump(c2),
|
||||
spew.Sdump(test.result))
|
||||
}
|
||||
if !reflect.DeepEqual(c, c2) {
|
||||
t.Errorf("%s: unmarshal not as we started with. "+
|
||||
"got %v wanted %v", test.name, spew.Sdump(c2),
|
||||
spew.Sdump(c))
|
||||
}
|
||||
|
||||
// id from Id func must match result.
|
||||
if c.Id() != test.result.Id() {
|
||||
t.Errorf("%s: Id returned incorrect id. "+
|
||||
"got %v wanted %v", test.name, c.Id(),
|
||||
test.result.Id())
|
||||
}
|
||||
|
||||
// method from Method func must match result.
|
||||
if c.Method() != test.result.Method() {
|
||||
t.Errorf("%s: Method returned incorrect method. "+
|
||||
"got %v wanted %v", test.name, c.Method(),
|
||||
test.result.Method())
|
||||
}
|
||||
|
||||
// Read marshaled command back into c. Should still
|
||||
// match result.
|
||||
c.UnmarshalJSON(mc)
|
||||
if !reflect.DeepEqual(test.result, c) {
|
||||
t.Errorf("%s: unmarshal not as expected. "+
|
||||
"got %v wanted %v", test.name, spew.Sdump(c),
|
||||
spew.Sdump(test.result))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,107 +1,107 @@
|
|||
|
||||
github.com/conformal/btcws/cmds.go init 100.00% (10/10)
|
||||
github.com/conformal/btcws/notifications.go init 100.00% (7/7)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewWalletLockStateNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewTxNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetCurrentNetCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetBestBlockCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewNotifyNewTXsCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewNotifySpentCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewCreateEncryptedWalletCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetBalancesCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewAccountBalanceNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewBlockConnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewBlockDisconnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewBtcdConnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewTxMinedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewBtcdConnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewBlockDisconnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewBlockConnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewAccountBalanceNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewTxNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewWalletLockStateNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go parseListAllTransactionsCmd 87.50% (7/8)
|
||||
github.com/conformal/btcws/cmds.go NewWalletIsLockedCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewRescanCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewGetAddressBalanceCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewListAllTransactionsCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go parseRescanCmd 77.78% (14/18)
|
||||
github.com/conformal/btcws/cmds.go parseNotifyNewTXsCmd 75.00% (9/12)
|
||||
github.com/conformal/btcws/cmds.go parseWalletIsLockedCmd 75.00% (6/8)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go parseGetAddressBalanceCmd 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go parseTxMinedNtfn 70.00% (14/20)
|
||||
github.com/conformal/btcws/cmds.go parseCreateEncryptedWalletCmd 69.23% (9/13)
|
||||
github.com/conformal/btcws/cmds.go parseNotifySpentCmd 66.67% (10/15)
|
||||
github.com/conformal/btcws/cmds.go parseGetCurrentNetCmd 66.67% (2/3)
|
||||
github.com/conformal/btcws/cmds.go parseGetBestBlockCmd 66.67% (2/3)
|
||||
github.com/conformal/btcws/cmds.go parseGetBalancesCmd 66.67% (2/3)
|
||||
github.com/conformal/btcws/notifications.go parseAccountBalanceNtfn 64.29% (9/14)
|
||||
github.com/conformal/btcws/notifications.go parseBlockDisconnectedNtfn 63.64% (7/11)
|
||||
github.com/conformal/btcws/notifications.go parseTxNtfn 63.64% (7/11)
|
||||
github.com/conformal/btcws/notifications.go parseWalletLockStateNtfn 63.64% (7/11)
|
||||
github.com/conformal/btcws/notifications.go parseBlockConnectedNtfn 63.64% (7/11)
|
||||
github.com/conformal/btcws/notifications.go parseBlockDisconnectedNtfn 63.64% (7/11)
|
||||
github.com/conformal/btcws/notifications.go parseBtcdConnectedNtfn 62.50% (5/8)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.UnmarshalJSON 45.45% (5/11)
|
||||
github.com/conformal/btcws/cmds.go parseRescanCmd 0.00% (0/18)
|
||||
github.com/conformal/btcws/cmds.go parseNotifySpentCmd 0.00% (0/15)
|
||||
github.com/conformal/btcws/cmds.go parseCreateEncryptedWalletCmd 0.00% (0/13)
|
||||
github.com/conformal/btcws/cmds.go parseNotifyNewTXsCmd 0.00% (0/12)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go parseGetAddressBalanceCmd 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.UnmarshalJSON 0.00% (0/11)
|
||||
github.com/conformal/btcws/cmds.go parseListAllTransactionsCmd 0.00% (0/8)
|
||||
github.com/conformal/btcws/cmds.go parseWalletIsLockedCmd 0.00% (0/8)
|
||||
github.com/conformal/btcws/cmds.go NewRescanCmd 0.00% (0/6)
|
||||
github.com/conformal/btcws/cmds.go NewListAllTransactionsCmd 0.00% (0/6)
|
||||
github.com/conformal/btcws/cmds.go NewGetAddressBalanceCmd 0.00% (0/6)
|
||||
github.com/conformal/btcws/cmds.go NewWalletIsLockedCmd 0.00% (0/6)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.MarshalJSON 0.00% (0/4)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.MarshalJSON 0.00% (0/4)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.MarshalJSON 0.00% (0/4)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.MarshalJSON 0.00% (0/4)
|
||||
github.com/conformal/btcws/cmds.go parseGetBalancesCmd 0.00% (0/3)
|
||||
github.com/conformal/btcws/cmds.go parseGetBestBlockCmd 0.00% (0/3)
|
||||
github.com/conformal/btcws/cmds.go parseGetCurrentNetCmd 0.00% (0/3)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.MarshalJSON 0.00% (0/2)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.MarshalJSON 0.00% (0/2)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.MarshalJSON 0.00% (0/2)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.MarshalJSON 0.00% (0/2)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.MarshalJSON 0.00% (0/2)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.MarshalJSON 0.00% (0/2)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NewNotifySpentCmd 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetBalancesCmd 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NewNotifyNewTXsCmd 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetCurrentNetCmd 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetBestBlockCmd 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NewCreateEncryptedWalletCmd 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.Id 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.Method 0.00% (0/1)
|
||||
github.com/conformal/btcws -------------------------------------- 32.39% (161/497)
|
||||
github.com/conformal/btcws -------------------------------------- 77.26% (384/497)
|
||||
|
||||
|
|
Loading…
Reference in a new issue