Add RescanResultNtfn to notify rescan results.
This commit is contained in:
parent
c06d4007fe
commit
9ea77c00f2
3 changed files with 263 additions and 52 deletions
156
notifications.go
156
notifications.go
|
@ -34,6 +34,10 @@ const (
|
|||
// btcdconnected notification.
|
||||
BtcdConnectedNtfnMethod = "btcdconnected"
|
||||
|
||||
// RescanResultNtfnMethod is the method of the btcd
|
||||
// rescanresult notification.
|
||||
RescanResultNtfnMethod = "rescanresult"
|
||||
|
||||
// TxMinedNtfnMethod is the method of the btcd txmined
|
||||
// notification.
|
||||
TxMinedNtfnMethod = "txmined"
|
||||
|
@ -53,6 +57,7 @@ func init() {
|
|||
btcjson.RegisterCustomCmd(BlockConnectedNtfnMethod, parseBlockConnectedNtfn)
|
||||
btcjson.RegisterCustomCmd(BlockDisconnectedNtfnMethod, parseBlockDisconnectedNtfn)
|
||||
btcjson.RegisterCustomCmd(BtcdConnectedNtfnMethod, parseBtcdConnectedNtfn)
|
||||
btcjson.RegisterCustomCmd(RescanResultNtfnMethod, parseRescanResultNtfn)
|
||||
btcjson.RegisterCustomCmd(TxMinedNtfnMethod, parseTxMinedNtfn)
|
||||
btcjson.RegisterCustomCmd(TxNtfnMethod, parseTxNtfn)
|
||||
btcjson.RegisterCustomCmd(WalletLockStateNtfnMethod, parseWalletLockStateNtfn)
|
||||
|
@ -435,6 +440,157 @@ func (n *BtcdConnectedNtfn) UnmarshalJSON(b []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// RescanResultNtfn is a type handling custom marshaling and unmarshaling
|
||||
// of rescanresult JSON websocket notifications.
|
||||
type RescanResultNtfn struct {
|
||||
Receiver string
|
||||
Amount int64
|
||||
TxID string
|
||||
TxOutIndex uint32
|
||||
PkScript string
|
||||
BlockHash string
|
||||
BlockHeight int32
|
||||
BlockIndex int
|
||||
BlockTime int64
|
||||
Spent bool
|
||||
}
|
||||
|
||||
// Enforce that RescanResultNtfn satisifies the btcjson.Cmd interface.
|
||||
var _ btcjson.Cmd = &RescanResultNtfn{}
|
||||
|
||||
// parseRescanResultNtfn parses a RawCmd into a concrete type satisifying
|
||||
// the btcjson.Cmd interface. This is used when registering the notification
|
||||
// with the btcjson parser.
|
||||
func parseRescanResultNtfn(r *btcjson.RawCmd) (btcjson.Cmd, error) {
|
||||
if r.Id != nil {
|
||||
return nil, ErrNotANtfn
|
||||
}
|
||||
|
||||
if len(r.Params) != 10 {
|
||||
return nil, btcjson.ErrWrongNumberOfParams
|
||||
}
|
||||
|
||||
receiver, ok := r.Params[0].(string)
|
||||
if !ok {
|
||||
return nil, errors.New("first parameter receiver must be a string")
|
||||
}
|
||||
famount, ok := r.Params[1].(float64)
|
||||
if !ok {
|
||||
return nil, errors.New("second parameter amount must be a number")
|
||||
}
|
||||
amount := int64(famount)
|
||||
txid, ok := r.Params[2].(string)
|
||||
if !ok {
|
||||
return nil, errors.New("third parameter txid must be a string")
|
||||
}
|
||||
fTxOutIdx, ok := r.Params[3].(float64)
|
||||
if !ok {
|
||||
return nil, errors.New("fourth parameter txoutidx must be a number")
|
||||
}
|
||||
txOutIdx := uint32(fTxOutIdx)
|
||||
pkScript, ok := r.Params[4].(string)
|
||||
if !ok {
|
||||
return nil, errors.New("fifth parameter pkScript must be a string")
|
||||
}
|
||||
blockHash := r.Params[5].(string)
|
||||
if !ok {
|
||||
return nil, errors.New("sixth parameter blockHash must be a string")
|
||||
}
|
||||
fBlockHeight, ok := r.Params[6].(float64)
|
||||
if !ok {
|
||||
return nil, errors.New("seventh parameter blockHeight must be a number")
|
||||
}
|
||||
blockHeight := int32(fBlockHeight)
|
||||
fBlockIndex, ok := r.Params[7].(float64)
|
||||
if !ok {
|
||||
return nil, errors.New("eighth parameter blockIndex must be a number")
|
||||
}
|
||||
blockIndex := int(fBlockIndex)
|
||||
fBlockTime, ok := r.Params[8].(float64)
|
||||
if !ok {
|
||||
return nil, errors.New("ninth parameter blockTime must be a number")
|
||||
}
|
||||
blockTime := int64(fBlockTime)
|
||||
spent, ok := r.Params[9].(bool)
|
||||
if !ok {
|
||||
return nil, errors.New("tenth parameter spent must be a bool")
|
||||
}
|
||||
|
||||
cmd := &RescanResultNtfn{
|
||||
Receiver: receiver,
|
||||
Amount: amount,
|
||||
TxID: txid,
|
||||
TxOutIndex: txOutIdx,
|
||||
PkScript: pkScript,
|
||||
BlockHash: blockHash,
|
||||
BlockHeight: blockHeight,
|
||||
BlockIndex: blockIndex,
|
||||
BlockTime: blockTime,
|
||||
Spent: spent,
|
||||
}
|
||||
return cmd, nil
|
||||
}
|
||||
|
||||
// Id satisifies the btcjson.Cmd interface by returning nil for a
|
||||
// notification ID.
|
||||
func (n *RescanResultNtfn) Id() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetId is implemented to satisify the btcjson.Cmd interface. The
|
||||
// notification id is not modified.
|
||||
func (n *RescanResultNtfn) SetId(id interface{}) {}
|
||||
|
||||
// Method satisifies the btcjson.Cmd interface by returning the method
|
||||
// of the notification.
|
||||
func (n *RescanResultNtfn) Method() string {
|
||||
return RescanResultNtfnMethod
|
||||
}
|
||||
|
||||
// MarshalJSON returns the JSON encoding of n. Part of the btcjson.Cmd
|
||||
// interface.
|
||||
func (n *RescanResultNtfn) MarshalJSON() ([]byte, error) {
|
||||
ntfn := btcjson.Message{
|
||||
Jsonrpc: "1.0",
|
||||
Method: n.Method(),
|
||||
Params: []interface{}{
|
||||
n.Receiver,
|
||||
n.Amount,
|
||||
n.TxID,
|
||||
n.TxOutIndex,
|
||||
n.PkScript,
|
||||
n.BlockHash,
|
||||
n.BlockHeight,
|
||||
n.BlockIndex,
|
||||
n.BlockTime,
|
||||
n.Spent,
|
||||
},
|
||||
}
|
||||
return json.Marshal(ntfn)
|
||||
}
|
||||
|
||||
// UnmarshalJSON unmarshals the JSON encoding of n into n. Part of
|
||||
// the btcjson.Cmd interface.
|
||||
func (n *RescanResultNtfn) UnmarshalJSON(b []byte) error {
|
||||
// Unmarshal into a RawCmd.
|
||||
var r btcjson.RawCmd
|
||||
if err := json.Unmarshal(b, &r); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
newNtfn, err := parseRescanResultNtfn(&r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
concreteNtfn, ok := newNtfn.(*RescanResultNtfn)
|
||||
if !ok {
|
||||
return btcjson.ErrInternal
|
||||
}
|
||||
*n = *concreteNtfn
|
||||
return nil
|
||||
}
|
||||
|
||||
// TxMinedNtfn is a type handling custom marshaling and
|
||||
// unmarshaling of txmined JSON websocket notifications.
|
||||
type TxMinedNtfn struct {
|
||||
|
|
|
@ -61,6 +61,36 @@ var ntfntests = []struct {
|
|||
Connected: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "rescanresult",
|
||||
f: func() btcjson.Cmd {
|
||||
cmd := &btcws.RescanResultNtfn{
|
||||
Receiver: "miFxiuApPo3KBqtMnPUjasZmHoVnoH3Eoc",
|
||||
Amount: 200000000,
|
||||
TxID: "851f5c0652e785c5ed80aafaf2d918e5cbe5c307dbba3680808ada1d01f36886",
|
||||
TxOutIndex: 1,
|
||||
PkScript: "76a9141e127eda7cd71b9724085f588840a3e9d697ae9888ac",
|
||||
BlockHash: "000000004811dda1c320ad5d0ea184a20a53acd92292c5f1cb926c3ee82abf70",
|
||||
BlockHeight: 153469,
|
||||
BlockIndex: 1,
|
||||
BlockTime: 1386944019,
|
||||
Spent: true,
|
||||
}
|
||||
return cmd
|
||||
},
|
||||
result: &btcws.RescanResultNtfn{
|
||||
Receiver: "miFxiuApPo3KBqtMnPUjasZmHoVnoH3Eoc",
|
||||
Amount: 200000000,
|
||||
TxID: "851f5c0652e785c5ed80aafaf2d918e5cbe5c307dbba3680808ada1d01f36886",
|
||||
TxOutIndex: 1,
|
||||
PkScript: "76a9141e127eda7cd71b9724085f588840a3e9d697ae9888ac",
|
||||
BlockHash: "000000004811dda1c320ad5d0ea184a20a53acd92292c5f1cb926c3ee82abf70",
|
||||
BlockHeight: 153469,
|
||||
BlockIndex: 1,
|
||||
BlockTime: 1386944019,
|
||||
Spent: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "txmined",
|
||||
f: func() btcjson.Cmd {
|
||||
|
|
|
@ -1,89 +1,92 @@
|
|||
|
||||
github.com/conformal/btcws/cmds.go init 100.00% (12/12)
|
||||
github.com/conformal/btcws/notifications.go init 100.00% (7/7)
|
||||
github.com/conformal/btcws/notifications.go init 100.00% (8/8)
|
||||
github.com/conformal/btcws/cmds.go ListAddressTransactionsCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.MarshalJSON 100.00% (4/4)
|
||||
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 WalletIsLockedCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/cmds.go GetUnconfirmedBalanceCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.MarshalJSON 100.00% (2/2)
|
||||
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/cmds.go NotifySpentCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.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 CreateEncryptedWalletCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go RescanResultNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewNotifySpentCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewTxNtfn 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 NewGetCurrentNetCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewCreateEncryptedWalletCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewWalletLockStateNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetCurrentNetCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetBalancesCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go ListAddressTransactionsCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewTxMinedNtfn 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 GetUnconfirmedBalanceCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewBlockDisconnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewTxNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.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 NewBtcdConnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.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 BlockConnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetBestBlockCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewBlockDisconnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewWalletLockStateNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.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/notifications.go WalletLockStateNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewNotifySpentCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go ListAddressTransactionsCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go RescanResultNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go ListAddressTransactionsCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go RescanResultNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetUnconfirmedBalanceCmd.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 TxNtfn.Method 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/cmds.go NewGetBestBlockCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewBlockConnectedNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.Id 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/cmds.go ListAddressTransactionsCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetUnconfirmedBalanceCmd.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go parseListAllTransactionsCmd 87.50% (7/8)
|
||||
github.com/conformal/btcws/cmds.go NewGetAddressBalanceCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewWalletIsLockedCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewListAddressTransactionsCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewGetAddressBalanceCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewRescanCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewListAllTransactionsCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewWalletIsLockedCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewGetUnconfirmedBalanceCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go parseRescanCmd 77.78% (14/18)
|
||||
github.com/conformal/btcws/cmds.go parseListAddressTransactionsCmd 76.47% (13/17)
|
||||
github.com/conformal/btcws/cmds.go parseNotifyNewTXsCmd 75.00% (9/12)
|
||||
github.com/conformal/btcws/cmds.go parseGetUnconfirmedBalanceCmd 75.00% (6/8)
|
||||
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 BlockDisconnectedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetUnconfirmedBalanceCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.UnmarshalJSON 72.73% (8/11)
|
||||
|
@ -91,29 +94,51 @@ github.com/conformal/btcws/cmds.go RescanCmd.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 CreateEncryptedWalletCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go ListAddressTransactionsCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go ListAddressTransactionsCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go parseGetAddressBalanceCmd 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go RescanResultNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go parseRescanResultNtfn 70.73% (29/41)
|
||||
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/cmds.go parseGetCurrentNetCmd 66.67% (2/3)
|
||||
github.com/conformal/btcws/notifications.go parseAccountBalanceNtfn 64.29% (9/14)
|
||||
github.com/conformal/btcws/notifications.go parseBlockConnectedNtfn 63.64% (7/11)
|
||||
github.com/conformal/btcws/notifications.go parseWalletLockStateNtfn 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 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 ---------------------------------------- 77.72% (443/570)
|
||||
github.com/conformal/btcws/cmds.go GetUnconfirmedBalanceCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go ListAddressTransactionsCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go RescanResultNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws ---------------------------------------- 75.90% (485/639)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue