Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gocycle in chain.go #434

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

zhugelianglongming
Copy link
Collaborator

see #402

kernel/engines/xuperos/chain.go
Line 118: warning: cyclomatic complexity 23 of function (*Chain).PreExec() is high (> 15) (gocyclo)

@@ -115,24 +116,18 @@ func (t *Chain) Context() *common.ChainCtx {
}

// 交易预执行
func (t *Chain) PreExec(ctx xctx.XContext, reqs []*protos.InvokeRequest, initiator string, authRequires []string) (*protos.InvokeResponse, error) {
func (t *Chain) PreExec(ctx xctx.XContext, reqs []*protos.InvokeRequest, initiator string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个接口改完本地跑过 reserved contract 相关测试吗

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本地跑的测试相当于是 reserved contract 为空的环境
现在 5.* 一般如何在测试/本地环境 测试 reserved contract ?看代码好像没有给 put 的更新接口。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

kernel/engines/xuperos/chain.go Outdated Show resolved Hide resolved
kernel/engines/xuperos/chain.go Outdated Show resolved Hide resolved
kernel/engines/xuperos/chain.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants