Skip to content

Commit

Permalink
bridge: fix terra devnet retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo committed Feb 2, 2021
1 parent 201581b commit 02c750b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bridge/pkg/processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,15 @@ func (p *Processor) checkDevModeGuardianSetUpdate(ctx context.Context) error {
// Submit to Terra
go func() {
for {
timeout, cancel := context.WithTimeout(ctx, 5*time.Second)
trxResponse, err := terra.SubmitVAA(timeout, p.terraLCD, p.terraChainID, p.terraContract, p.terraFeePayer, v)
if err != nil {
cancel()
p.logger.Error("failed to submit Terra devnet guardian set change, retrying", zap.Error(err))
time.Sleep(1 * time.Second)
continue
}
cancel()
p.logger.Info("devnet guardian set change submitted to Terra", zap.Any("trxResponse", trxResponse), zap.Any("vaa", v))
break
}
Expand Down

0 comments on commit 02c750b

Please sign in to comment.