Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
polygon/bridge: fix BorTxLookup encoding discrepancy (#12345)
``` EROR[10-16|01:26:00.055] Staged Sync err="runtime error: index out of range [7] with length 3, trace: [stageloop.go:202 panic.go:770 panic.go:114 binary.go:183 db.go:548 db.go:474 stage_polygon_sync.go:1306 stage_polygon_sync.go:1816 stage_polygon_sync.go:578 stage_polygon_sync.g o:196 default_stages.go:479 sync.go:531 sync.go:410 stageloop.go:249 stageloop.go:101 asm_arm64.s:1222]" ``` Fixes an index out of range found while running Astrid stage integration. The problem was due to encoding mismatch in the BorTxLookup table. The current code uses big.Int byte encoding for storing the block number, while the Astrid Bridge assumed binary.BigEndian.Uint64 encoding. This PR fixes the runtime error and brings the 2 implementations in sync by keeping the new one backward compatible.
- Loading branch information