mirror of
https://github.com/kaspanet/kaspad.git
synced 2026-03-03 16:00:28 +00:00
The following changes were made to ListTransactionsResult (which models the long result format used by listtransactions, listsinceblock, etc.): - Fee made optional (float64 -> *float64 + omitempty) - BlockIndex made optional (int64 + omitempty -> *int64 + omitempty) - InvolvesWatchOnly added (bool + omitempty) - Vout added (uint32) The following changes were made to GetTransactionDetailsResult (which models the short result format of listtransactions): - InvolvesWatchOnly added (bool + omitempty) - Fee added (*float64 + omitempty) - Vout added (uint32) The combination of pointer types and the omitempty struct tag allow excluding the field from the JSON object, or including it with the zero value. This is useful in particular for the fee fields, which should be included whenever the category is "send" even if the fee is zero. Other optional fields which are only added to the result object with non-zero values (such as includeswatchonly) can be reduced to simply an omitempty tag without the pointer type.
2.1 KiB
2.1 KiB