Handle supervisor.RunGroup error

This commit is contained in:
Leo 2020-08-21 11:57:04 +02:00
parent 935411c036
commit 10621625f0
1 changed files with 5 additions and 3 deletions

View File

@ -180,10 +180,12 @@ func main() {
// We need to re-fetch the initial initiator set when ethwatch dies, so we want to restart the watcher as well.
// TODO: on-demand fetching of guardian set to avoid restarting ethwatch?
supervisor.RunGroup(ctx, map[string]supervisor.Runnable{
"ethwatch": ethereum.NewEthBridgeWatcher(*ethRPC, ethContractAddr, *ethConfirmations, lockC, setC).Run,
if err := supervisor.RunGroup(ctx, map[string]supervisor.Runnable{
"ethwatch": ethereum.NewEthBridgeWatcher(*ethRPC, ethContractAddr, *ethConfirmations, lockC, setC).Run,
"ethlockup": ethLockupProcessor(lockC, setC, gk, sendC, ethObsvC, vaaC),
})
}); err != nil {
return err
}
if err := supervisor.Run(ctx, "solana",
solana.NewSolanaBridgeWatcher(*agentRPC, lockC, vaaC).Run); err != nil {