Unmarshal empty addresses as empty slice not as nil

This commit is contained in:
Jakub Matys 2018-06-21 13:53:27 +02:00
parent 5e6712535b
commit ffe3650a0f

View File

@ -32,14 +32,14 @@ type Vin struct {
Vout uint32 `json:"vout"` Vout uint32 `json:"vout"`
ScriptSig ScriptSig `json:"scriptSig"` ScriptSig ScriptSig `json:"scriptSig"`
Sequence uint32 `json:"sequence"` Sequence uint32 `json:"sequence"`
Addresses []string `json:"addresses,omitempty"` Addresses []string `json:"addresses"`
} }
type ScriptPubKey struct { type ScriptPubKey struct {
// Asm string `json:"asm"` // Asm string `json:"asm"`
Hex string `json:"hex,omitempty"` Hex string `json:"hex,omitempty"`
// Type string `json:"type"` // Type string `json:"type"`
Addresses []string `json:"addresses,omitempty"` Addresses []string `json:"addresses"`
} }
type Address interface { type Address interface {