-
Notifications
You must be signed in to change notification settings - Fork 189
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
complete KAS anchor feature (NEED TO REBASE THE LAST PR) #597
Conversation
fafc1cd
to
d831362
Compare
I will rebase this on the last PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between this and #591?
cmd/utils/nodecmd/dumpconfigcmd.go
Outdated
@@ -287,6 +287,10 @@ func makeServiceChainConfig(ctx *cli.Context) (config sc.SCConfig) { | |||
cfg.KASAnchor = ctx.GlobalBool(utils.KASServiceChainAnchorFlag.Name) | |||
if cfg.KASAnchor { | |||
cfg.KASAnchorPeriod = ctx.GlobalUint64(utils.KASServiceChainAnchorPeriodFlag.Name) | |||
if cfg.KASAnchorPeriod == 0 { | |||
cfg.KASAnchorPeriod = 1 | |||
logger.Warn("KAS anchor period is set by 1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.Warn("KAS anchor period is set by 1") | |
logger.Warn("KAS anchor period is not given, KAS anchor period is set by 1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is that user gives 0
for this option. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then the message should be something like below to notify the user that the anchor period can't be set as 0.
As KAS anchor period can't be set as 0, now KAS anchoring started with the period as 1
console/web3ext/web3ext.go
Outdated
@@ -1012,6 +1012,11 @@ web3._extend({ | |||
call: 'subbridge_unsubscribeBridge', | |||
params: 2 | |||
}), | |||
new web3._extend.Method({ | |||
name: 'KASAnchor', | |||
call: 'subbridge_kASAnchor', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call: 'subbridge_kASAnchor', | |
call: 'subbridge_kasAnchor', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subbridge_kASAnchor
looks werid. But this is for subbridge.KASAnchor()
. :)
@KimKyungup Could you please check this comment? |
d831362
to
2eb90d1
Compare
Proposed changes
This PR is the last PR of KAS anchor feature.
Below works are included.
KASAnchor
APIKASAnchoirPeriod
Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
$ make test
)Related issues
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...