[v1.x.x-specific] Initialise NewRUNEPool Uint fields to bypass historical-data panic
[v1.x.x-specific] (because only relevant for thorchain-mainnet-v1 historical blocks)
[Edit: Now also wanted for thorchain-mainnet-v2, so NewRUNEPool never starts with empty-Uint fields.
My current impression is that this should prevent the querier from panicking in historical blocks,
and should not cause SetRUNEPool sync failure as Cosmos-SDK's Uint MarshalJSON treats empty and zero Uints identically.
https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/types/uint.go#L136-L141
func (u Uint) MarshalJSON() ([]byte, error) {
if u.i == nil { // Necessary since default Uint initialization has i.i as nil
u.i = new(big.Int)
}
return marshalJSON(u.i)
}
]
Intended to close #2023 (closed)
'Historical POL (PnL) data is hidden by /thorchain/runepool panic'.
Edited by Multipartite