Commit 7fd2319
authored
Increase MovedFundsSweepLookBackBlocks from 30 to 50 days (#3865)
## Summary
- Increase `MovedFundsSweepLookBackBlocks` from `uint64(216000)` (30
days) to `uint64(360000)` (50 days)
- Fixes a production failure where 363.54 BTC became stuck because a
`MovingFundsCompleted` event was ~38 days old (273,886 blocks),
exceeding the current 216,000-block lookback by ~58,000 blocks
- The new 360,000-block lookback provides 32% headroom beyond the
observed failure case
## Details
The constant is used in `FindMovingFundsTxData()` to compute
`filterStartBlock = currentBlockNumber - MovedFundsSweepLookBackBlocks`,
which determines how far back to search for
`MovingFundsCommitmentSubmitted` and `MovingFundsCompleted` events.
**Arithmetic:**
- Old: `216,000 blocks × 12s = 30 days`
- New: `360,000 blocks × 12s = 50 days`
**RPC impact:** Negligible — `MovingFundsCompleted` events are rare
(~10-15/year across all wallets), and log filtering is indexed by topic
and contract address.
## Test plan
- [x] `go build ./pkg/tbtcpg/...` compiles
- [x] `go test ./pkg/tbtcpg/...` passes (all existing tests use symbolic
reference to the constant)
- [x] `go test -race ./pkg/tbtcpg/...` passes
- [x] `go vet ./pkg/tbtcpg/...` passes1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments