rpc: omitempty some fields in TransactionOutputRaw

These might be undefined for mempool transactions, thus they should be defined
as omitempty.
This commit is contained in:
Roman Khimov 2020-02-20 19:31:16 +03:00
parent bba8ac15ff
commit 877b987ecf

View file

@ -16,9 +16,9 @@ type TransactionOutputRaw struct {
Size int `json:"size"`
SysFee util.Fixed8 `json:"sys_fee"`
NetFee util.Fixed8 `json:"net_fee"`
Blockhash util.Uint256 `json:"blockhash"`
Confirmations int `json:"confirmations"`
Timestamp uint32 `json:"blocktime"`
Blockhash util.Uint256 `json:"blockhash,omitempty"`
Confirmations int `json:"confirmations,omitempty"`
Timestamp uint32 `json:"blocktime,omitempty"`
}
// NewTransactionOutputRaw returns a new ransactionOutputRaw object.