diff --git a/btcjson/chainsvrresults.go b/btcjson/chainsvrresults.go index afe518aab..168d0034c 100644 --- a/btcjson/chainsvrresults.go +++ b/btcjson/chainsvrresults.go @@ -318,7 +318,7 @@ type TxRawResult struct { Vin []Vin `json:"vin"` Vout []Vout `json:"vout"` BlockHash string `json:"blockhash,omitempty"` - Confirmations uint64 `json:"confirmations"` + Confirmations uint64 `json:"confirmations,omitempty"` Time int64 `json:"time,omitempty"` Blocktime int64 `json:"blocktime,omitempty"` } diff --git a/btcjson/chainsvrwsntfns_test.go b/btcjson/chainsvrwsntfns_test.go index cf76c01ce..f09c0d065 100644 --- a/btcjson/chainsvrwsntfns_test.go +++ b/btcjson/chainsvrwsntfns_test.go @@ -167,7 +167,7 @@ func TestChainSvrWsNtfns(t *testing.T) { } return btcjson.NewTxAcceptedVerboseNtfn(txResult) }, - marshalled: `{"jsonrpc":"1.0","method":"txacceptedverbose","params":[{"hex":"001122","txid":"123","version":1,"locktime":4294967295,"vin":null,"vout":null,"confirmations":0}],"id":null}`, + marshalled: `{"jsonrpc":"1.0","method":"txacceptedverbose","params":[{"hex":"001122","txid":"123","version":1,"locktime":4294967295,"vin":null,"vout":null}],"id":null}`, unmarshalled: &btcjson.TxAcceptedVerboseNtfn{ RawTx: btcjson.TxRawResult{ Hex: "001122",