From b94598da551c45887de16d96634ed09163a9dcbc Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 15 Jan 2015 11:40:18 -0800 Subject: [PATCH] Remove `omitempty` fromTxRawResult confirmations * Previously both searchrawtransaction and getrawtransaction would omit the 'Confirmations' field by default if the transaction was found in the mempool. * By removing `omitempty`, a mempool transaction will now have 'Confirmations:0' --- jsonresults.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonresults.go b/jsonresults.go index 55b751e8cc..f8098e4cfc 100644 --- a/jsonresults.go +++ b/jsonresults.go @@ -410,7 +410,7 @@ type TxRawResult struct { Vin []Vin `json:"vin"` Vout []Vout `json:"vout"` BlockHash string `json:"blockhash,omitempty"` - Confirmations uint64 `json:"confirmations,omitempty"` + Confirmations uint64 `json:"confirmations"` Time int64 `json:"time,omitempty"` Blocktime int64 `json:"blocktime,omitempty"` }