[fix] export all pending outbounds in genesis
When exporting genesis, we include any pending outbounds scheduled for the current height and into the future. We do not look backwards for earlier outbounds that have yet to be completed:
https://gitlab.com/thorchain/thornode/-/blob/develop/x/thorchain/genesis.go?ref_type=heads#L391-394
We should be looking back signingPeriod = 300
blocks, and should be using using the mimir configs for the lookahead params instead of hard-coding.
The issue can be demonstrated by updating an outbound-producing regression test to tick one extra block, as I do in this diff:
diff --git a/test/regression/suites/synths/synths.yaml b/test/regression/suites/synths/synths.yaml
index 44f95ac47..cd884d074 100644
--- a/test/regression/suites/synths/synths.yaml
+++ b/test/regression/suites/synths/synths.yaml
@@ -92,7 +92,7 @@ coins:
memo: "=:BTC.BTC:{{ addr_btc_fox }}"
---
type: create-blocks
-count: 1
+count: 2
---
type: check
endpoint: http://localhost:1317/cosmos/bank/v1beta1/balances/{{ addr_thor_fox }}
This results in a genesis export invariant break since the funds on the pending outbound are lost:
6:43AM ERR cmd/export.go:178 > BTC.BTC vaults have 4337764 more than their pool
Edited by akrokr