bridge: fix terra devnet retry
This commit is contained in:
parent
201581b1de
commit
02c750bc7e
|
@ -191,12 +191,15 @@ func (p *Processor) checkDevModeGuardianSetUpdate(ctx context.Context) error {
|
||||||
// Submit to Terra
|
// Submit to Terra
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
|
timeout, cancel := context.WithTimeout(ctx, 5*time.Second)
|
||||||
trxResponse, err := terra.SubmitVAA(timeout, p.terraLCD, p.terraChainID, p.terraContract, p.terraFeePayer, v)
|
trxResponse, err := terra.SubmitVAA(timeout, p.terraLCD, p.terraChainID, p.terraContract, p.terraFeePayer, v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
cancel()
|
||||||
p.logger.Error("failed to submit Terra devnet guardian set change, retrying", zap.Error(err))
|
p.logger.Error("failed to submit Terra devnet guardian set change, retrying", zap.Error(err))
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
cancel()
|
||||||
p.logger.Info("devnet guardian set change submitted to Terra", zap.Any("trxResponse", trxResponse), zap.Any("vaa", v))
|
p.logger.Info("devnet guardian set change submitted to Terra", zap.Any("trxResponse", trxResponse), zap.Any("vaa", v))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue