@@ -19,6 +19,7 @@ import (
19
19
ipfslog "github.com/ipfs/go-log/v2"
20
20
"github.com/joho/godotenv"
21
21
"github.com/libp2p/go-libp2p/core/crypto"
22
+ fly_common "github.com/wormhole-foundation/wormhole-monitor/fly/common"
22
23
"github.com/wormhole-foundation/wormhole-monitor/fly/utils"
23
24
"github.com/wormhole-foundation/wormhole/sdk/vaa"
24
25
@@ -129,6 +130,7 @@ func loadEnvVars() {
129
130
rpcUrl = verifyEnvVar ("RPC_URL" )
130
131
coreBridgeAddr = verifyEnvVar ("CORE_BRIDGE_ADDR" )
131
132
credentialsFile = verifyEnvVar ("CREDENTIALS_FILE" )
133
+ network = verifyEnvVar ("NETWORK" )
132
134
}
133
135
134
136
func verifyEnvVar (key string ) string {
@@ -220,6 +222,12 @@ func main() {
220
222
if err != nil {
221
223
logger .Fatal ("Failed to fetch guardian set" , zap .String ("rpc" , rpcUrl ), zap .Error (err ))
222
224
}
225
+ if env == common .MainNet {
226
+ // watch heartbeats for standby guardians
227
+ for _ , ge := range fly_common .StandbyMainnetGuardians {
228
+ sgs .Keys = append (sgs .Keys , eth_common .HexToAddress (ge .Address ))
229
+ }
230
+ }
223
231
logger .Info ("guardian set" , zap .Uint32 ("index" , idx ), zap .Any ("gs" , sgs ))
224
232
gs := common.GuardianSet {
225
233
Keys : sgs .Keys ,
0 commit comments