1 Star 1 Fork 0

NineLightY / chainmake-sdk-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
sdk_block_chain.go 829 Bytes
一键复制 编辑 原始数据 按行查看 历史
wanghongda 提交于 2021-12-03 18:08 . rpc send APIs set MaxCallSendMsgSize
/*
Copyright (C) BABEC. All rights reserved.
Copyright (C) THL A29 Limited, a Tencent company. All rights reserved.
SPDX-License-Identifier: Apache-2.0
*/
package chainmaker_sdk_go
import (
"context"
"fmt"
"chainmaker.org/chainmaker/pb-go/v2/config"
"google.golang.org/grpc"
)
func (cc *ChainClient) CheckNewBlockChainConfig() error {
cc.logger.Debug("[SDK] begin to send check new block chain config command")
req := &config.CheckNewBlockChainConfigRequest{}
client, err := cc.pool.getClient()
if err != nil {
return err
}
ctx := context.Background()
res, err := client.rpcNode.CheckNewBlockChainConfig(ctx, req, grpc.MaxCallSendMsgSize(client.rpcMaxSendMsgSize))
if err != nil {
return err
}
if res.Code != 0 {
return fmt.Errorf("check new block chain config failed, %s", res.Message)
}
return nil
}
1
https://gitee.com/jsharkc/chainmake-sdk-go.git
git@gitee.com:jsharkc/chainmake-sdk-go.git
jsharkc
chainmake-sdk-go
chainmake-sdk-go
cc4b8672c46d

搜索帮助