-
Notifications
You must be signed in to change notification settings - Fork 344
add vote reviser #2370
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
add vote reviser #2370
Conversation
@@ -55,7 +55,10 @@ func (r *receiptLog) SetData(data []byte) { | |||
r.data = data | |||
} | |||
|
|||
func (r *receiptLog) Build(ctx context.Context, err error) *action.Log { | |||
func (r *receiptLog) Build(ctx context.Context, err error, skipLogOnErr bool) *action.Log { | |||
if err != nil && skipLogOnErr { |
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.
why add this? don't think it's correct?
for instance, it returns ErrCandidateNotExist (not critical), in this case we should return a receipt with corresponding status
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.
BTW, this (skip log on err) is the behavior prior to FbkMigration height
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.
fixing the inconsistency of number of topics. skip only after greenland which is larger than fairbankmigrationheight
Plz also fix the test. Thanks |
Codecov Report
@@ Coverage Diff @@
## master #2370 +/- ##
==========================================
- Coverage 55.53% 55.52% -0.01%
==========================================
Files 216 217 +1
Lines 19747 19818 +71
==========================================
+ Hits 10966 11004 +38
- Misses 7348 7373 +25
- Partials 1433 1441 +8
Continue to review full report at Codecov.
|
aa42970
to
0656093
Compare
action/protocol/staking/protocol.go
Outdated
if !p.voteReviser.NeedRevise(blkCtx.BlockHeight) { | ||
return nil | ||
} |
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 is incorrect. should just skip revise not the whole function. that is why i used to put this check as an internal function. it is easy to skip other logic if check here
wait on nightly testing to merge |
No description provided.