node/hack/repair_eth: skip missed message

Otherwise, the script will run until the max number of times and
never complete.
This commit is contained in:
Jeff Schroeder 2022-04-28 14:52:58 -05:00 committed by Evan Gray
parent 542acdf0d6
commit 0981dc19bc
1 changed files with 13 additions and 1 deletions

View File

@ -250,7 +250,6 @@ func main() {
if !ok {
panic("no core contract")
}
ctx := context.Background()
jar, err := cookiejar.New(nil)
@ -275,6 +274,14 @@ func main() {
log.Fatalf("failed to get admin client: %v", err)
}
// A polygon VAA that was not reobserved before the blocks aged out of guardian rpc nodes
ignoreAddress, _ := vaa.StringToAddress("0000000000000000000000005a58505a96d1dbf8df91cb21b54419fc36e93fde")
polygonIgnoredVaa := db.VAAID{
Sequence: 6840,
EmitterChain: vaa.ChainIDPolygon,
EmitterAddress: ignoreAddress,
}
for _, emitter := range common.KnownEmitters {
if emitter.ChainID != chainID {
continue
@ -302,6 +309,11 @@ func main() {
if err != nil {
log.Fatalf("failed to parse VAAID: %v", err)
}
if *vId == polygonIgnoredVaa {
log.Printf("Ignored message: %+v", &polygonIgnoredVaa)
msgs = append(msgs[:i], msgs[i+1:]...)
continue
}
msgs[i] = vId
}