新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

Commit b43ee1e9 authored by krmnliu's avatar krmnliu

Merge branch 'v2.0.0_qc_zm0831' into 'v2.0.0_qc' (merge request !8)

v2.0.0_qc_zm0831
parents e43ce4a1 57bbf4d5
......@@ -8,11 +8,12 @@ SPDX-License-Identifier: Apache-2.0
package event
import (
"chainweaver.org.cn/chainweaver/ida/certification-service/v2/internal/code"
"context"
"errors"
"fmt"
"time"
"chainweaver.org.cn/chainweaver/ida/certification-service/v2/internal/code"
"chainweaver.org.cn/chainweaver/ida/certification-service/v2/internal/util"
"github.com/Rican7/retry"
"github.com/Rican7/retry/strategy"
......@@ -177,11 +178,16 @@ func (e *Manager) listenChainEvent(ctx context.Context, chainConfig *chainCli.Ch
// 尝试获取合约信息,如果失败则重试,每隔10s重试一次。
err = retry.Retry(func(uint) error {
contractInfo, err = e.chainConfigManager.chainClient.GetContractInfo(context.Background(), req)
if err != nil || contractInfo.Code != int32(code.Success) || contractInfo.Data == nil ||
len(contractInfo.Data.Name) == 0 {
e.Logger.Errorf("[event] get contract info failed from chain service, err:%s", err)
e.Logger.Infof("listenChainEvent, call GetContractInfo req:%s, resp:%s", util.ToJSON(req), util.ToJSON(contractInfo))
if err != nil {
e.Logger.Errorf("[event] get contract info failed from chain service, err:%v", err)
return err
}
if contractInfo.Code != int32(code.Success) || contractInfo.Data == nil || len(contractInfo.Data.Name) == 0 {
errStr := "listenChainEvent, call GetContractInfo data error."
e.Logger.Errorf(errStr)
return errors.New(errStr)
}
return nil
}, strategy.Wait(retryContractAndPlatformInfoInterval),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment