Add TxSpentNtfn to notify wallets spent outpoints.
This commit is contained in:
parent
6e3f9e451b
commit
d493181886
3 changed files with 211 additions and 83 deletions
107
notifications.go
107
notifications.go
|
@ -46,6 +46,10 @@ const (
|
|||
// notification.
|
||||
TxNtfnMethod = "newtx"
|
||||
|
||||
// TxSpentNtfnMethod is the method of the btcd txspent
|
||||
// notification.
|
||||
TxSpentNtfnMethod = "txspent"
|
||||
|
||||
// WalletLockStateNtfnMethod is the method of the btcwallet
|
||||
// walletlockstate notification.
|
||||
WalletLockStateNtfnMethod = "walletlockstate"
|
||||
|
@ -59,6 +63,7 @@ func init() {
|
|||
btcjson.RegisterCustomCmd(BtcdConnectedNtfnMethod, parseBtcdConnectedNtfn)
|
||||
btcjson.RegisterCustomCmd(ProcessedTxNtfnMethod, parseProcessedTxNtfn)
|
||||
btcjson.RegisterCustomCmd(TxMinedNtfnMethod, parseTxMinedNtfn)
|
||||
btcjson.RegisterCustomCmd(TxSpentNtfnMethod, parseTxSpentNtfn)
|
||||
btcjson.RegisterCustomCmd(TxNtfnMethod, parseTxNtfn)
|
||||
btcjson.RegisterCustomCmd(WalletLockStateNtfnMethod, parseWalletLockStateNtfn)
|
||||
}
|
||||
|
@ -716,6 +721,108 @@ type TxNtfn struct {
|
|||
Details map[string]interface{}
|
||||
}
|
||||
|
||||
// TxSpentNtfn is a type handling custom marshaling and
|
||||
// unmarshaling of txspent JSON websocket notifications.
|
||||
type TxSpentNtfn struct {
|
||||
SpentTxId string
|
||||
SpentTxOutIndex int
|
||||
SpendingTx string
|
||||
}
|
||||
|
||||
// Enforce that TxSpentNtfn satisifies the btcjson.Cmd interface.
|
||||
var _ btcjson.Cmd = &TxSpentNtfn{}
|
||||
|
||||
// NewTxSpentNtfn creates a new TxSpentNtfn.
|
||||
func NewTxSpentNtfn(txid string, txOutIndex int, spendingTx string) *TxSpentNtfn {
|
||||
return &TxSpentNtfn{
|
||||
SpentTxId: txid,
|
||||
SpentTxOutIndex: txOutIndex,
|
||||
SpendingTx: spendingTx,
|
||||
}
|
||||
}
|
||||
|
||||
// parseTxSpentNtfn parses a RawCmd into a concrete type satisifying
|
||||
// the btcjson.Cmd interface. This is used when registering the notification
|
||||
// with the btcjson parser.
|
||||
func parseTxSpentNtfn(r *btcjson.RawCmd) (btcjson.Cmd, error) {
|
||||
if r.Id != nil {
|
||||
return nil, ErrNotANtfn
|
||||
}
|
||||
|
||||
if len(r.Params) != 3 {
|
||||
return nil, btcjson.ErrWrongNumberOfParams
|
||||
}
|
||||
|
||||
txid, ok := r.Params[0].(string)
|
||||
if !ok {
|
||||
return nil, errors.New("first parameter txid must be a string")
|
||||
}
|
||||
findex, ok := r.Params[1].(float64)
|
||||
if !ok {
|
||||
return nil, errors.New("second parameter index must be a number")
|
||||
}
|
||||
index := int(findex)
|
||||
spendingTx, ok := r.Params[2].(string)
|
||||
if !ok {
|
||||
return nil, errors.New("third parameter spendingTx must be a string")
|
||||
}
|
||||
|
||||
return NewTxSpentNtfn(txid, index, spendingTx), nil
|
||||
}
|
||||
|
||||
// Id satisifies the btcjson.Cmd interface by returning nil for a
|
||||
// notification ID.
|
||||
func (n *TxSpentNtfn) Id() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetId is implemented to satisify the btcjson.Cmd interface. The
|
||||
// notification id is not modified.
|
||||
func (n *TxSpentNtfn) SetId(id interface{}) {}
|
||||
|
||||
// Method satisifies the btcjson.Cmd interface by returning the method
|
||||
// of the notification.
|
||||
func (n *TxSpentNtfn) Method() string {
|
||||
return TxSpentNtfnMethod
|
||||
}
|
||||
|
||||
// MarshalJSON returns the JSON encoding of n. Part of the btcjson.Cmd
|
||||
// interface.
|
||||
func (n *TxSpentNtfn) MarshalJSON() ([]byte, error) {
|
||||
ntfn := btcjson.Message{
|
||||
Jsonrpc: "1.0",
|
||||
Method: n.Method(),
|
||||
Params: []interface{}{
|
||||
n.SpentTxId,
|
||||
n.SpentTxOutIndex,
|
||||
n.SpendingTx,
|
||||
},
|
||||
}
|
||||
return json.Marshal(ntfn)
|
||||
}
|
||||
|
||||
// UnmarshalJSON unmarshals the JSON encoding of n into n. Part of
|
||||
// the btcjson.Cmd interface.
|
||||
func (n *TxSpentNtfn) UnmarshalJSON(b []byte) error {
|
||||
// Unmarshal into a RawCmd.
|
||||
var r btcjson.RawCmd
|
||||
if err := json.Unmarshal(b, &r); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
newNtfn, err := parseTxSpentNtfn(&r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
concreteNtfn, ok := newNtfn.(*TxSpentNtfn)
|
||||
if !ok {
|
||||
return btcjson.ErrInternal
|
||||
}
|
||||
*n = *concreteNtfn
|
||||
return nil
|
||||
}
|
||||
|
||||
// Enforce that TxNtfn satisifies the btcjson.Cmd interface.
|
||||
var _ btcjson.Cmd = &TxNtfn{}
|
||||
|
||||
|
|
|
@ -109,6 +109,20 @@ var ntfntests = []struct {
|
|||
Index: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "txspent",
|
||||
f: func() btcjson.Cmd {
|
||||
return btcws.NewTxSpentNtfn(
|
||||
"b22eb08001da1d57aec3131ccb46ea61820c46c71695a802585fbd56e93625a9",
|
||||
1,
|
||||
"0100000001a92536e956bd5f5802a89516c7460c8261ea46cb1c13c3ae571dda0180b02eb2010000006a4730440220240e3ad18a0393e9894120eb87ded8545222df4890cf98a55b5d36042c966898022031bbd795453fcd01b2a9eb30a8cbbe0ea043b7e4e85ff17ba2b44c243d14aafc0121028031f92546ff86436802fdfe07dc9e1876b70c8b8fa29ca9e9c90664d7022717ffffffff0200ab9041000000001976a91401f65945e042b5e09ecf0a9d9115adecb4caee8588ac703fbc0d040000001976a914c31a4d3e819598e55ff80601e4b2c662454385ca88ac00000000")
|
||||
},
|
||||
result: &btcws.TxSpentNtfn{
|
||||
SpentTxId: "b22eb08001da1d57aec3131ccb46ea61820c46c71695a802585fbd56e93625a9",
|
||||
SpentTxOutIndex: 1,
|
||||
SpendingTx: "0100000001a92536e956bd5f5802a89516c7460c8261ea46cb1c13c3ae571dda0180b02eb2010000006a4730440220240e3ad18a0393e9894120eb87ded8545222df4890cf98a55b5d36042c966898022031bbd795453fcd01b2a9eb30a8cbbe0ea043b7e4e85ff17ba2b44c243d14aafc0121028031f92546ff86436802fdfe07dc9e1876b70c8b8fa29ca9e9c90664d7022717ffffffff0200ab9041000000001976a91401f65945e042b5e09ecf0a9d9115adecb4caee8588ac703fbc0d040000001976a914c31a4d3e819598e55ff80601e4b2c662454385ca88ac00000000",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "newtx",
|
||||
f: func() btcjson.Cmd {
|
||||
|
|
|
@ -1,144 +1,151 @@
|
|||
|
||||
github.com/conformal/btcws/cmds.go init 100.00% (12/12)
|
||||
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/notifications.go init 100.00% (9/9)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.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 ListAddressTransactionsCmd.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/cmds.go WalletIsLockedCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/cmds.go GetUnconfirmedBalanceCmd.MarshalJSON 100.00% (4/4)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go GetBalancesCmd.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 ProcessedTxNtfn.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/cmds.go NotifySpentCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go TxSpentNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go ProcessedTxNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.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/notifications.go AccountBalanceNtfn.MarshalJSON 100.00% (2/2)
|
||||
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.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 NewNotifySpentCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewTxNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetUnconfirmedBalanceCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go GetUnconfirmedBalanceCmd.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 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/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 NewGetCurrentNetCmd 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewGetBalancesCmd 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 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 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/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 TxNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go ListAddressTransactionsCmd.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go ProcessedTxNtfn.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 ProcessedTxNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/cmds.go NewNotifySpentCmd 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 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 BlockDisconnectedNtfn.Method 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 ProcessedTxNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go ProcessedTxNtfn.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 TxMinedNtfn.Method 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go NewTxSpentNtfn 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxSpentNtfn.Id 100.00% (1/1)
|
||||
github.com/conformal/btcws/notifications.go TxSpentNtfn.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 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 NewRescanCmd 83.33% (5/6)
|
||||
github.com/conformal/btcws/cmds.go NewListAddressTransactionsCmd 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/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)
|
||||
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 parseGetUnconfirmedBalanceCmd 75.00% (6/8)
|
||||
github.com/conformal/btcws/notifications.go TxSpentNtfn.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 ProcessedTxNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetBestBlockCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go parseGetAddressBalanceCmd 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go ListAddressTransactionsCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetUnconfirmedBalanceCmd.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/notifications.go WalletLockStateNtfn.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/cmds.go NotifySpentCmd.UnmarshalJSON 72.73% (8/11)
|
||||
github.com/conformal/btcws/notifications.go parseProcessedTxNtfn 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/notifications.go parseTxSpentNtfn 66.67% (10/15)
|
||||
github.com/conformal/btcws/cmds.go parseNotifySpentCmd 66.67% (10/15)
|
||||
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/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 parseBlockConnectedNtfn 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 parseWalletLockStateNtfn 63.64% (7/11)
|
||||
github.com/conformal/btcws/notifications.go parseBlockConnectedNtfn 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 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 NotifySpentCmd.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/cmds.go ListAddressTransactionsCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go RescanCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.SetId 0.00% (0/1)
|
||||
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.SetId 0.00% (0/1)
|
||||
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 ProcessedTxNtfn.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)
|
||||
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go TxMinedNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go ProcessedTxNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go TxNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go TxSpentNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.SetId 0.00% (0/0)
|
||||
github.com/conformal/btcws ---------------------------------------- 75.86% (509/671)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue