Correct Vin ScriptSig to properly omit when empty.
In order for a field which is a struct to be omitted from JSON marshal/unmarshal, it must be a pointer so the json package can tell when it's empty (when it's nil).
This commit is contained in:
parent
1855c19562
commit
509bf830b1
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ type Vin struct {
|
|||
Coinbase string `json:"coinbase,omitempty"`
|
||||
Txid string `json:"txid,omitempty"`
|
||||
Vout int `json:"vout,omitempty"`
|
||||
ScriptSig struct {
|
||||
ScriptSig *struct {
|
||||
Asm string `json:"asm"`
|
||||
Hex string `json:"hex"`
|
||||
} `json:"scriptSig,omitempty"`
|
||||
|
|
Loading…
Reference in a new issue