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

Perform nextpin calculations for both confirmed and rejected messages #1326

Merged
merged 1 commit into from
May 31, 2023

Conversation

awrichar
Copy link
Contributor

Fixes #1324

Fixes hyperledger#1324

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@@ -481,7 +481,7 @@ func (ag *aggregator) processMessage(ctx context.Context, manifest *core.BatchMa
default:
// Check the pin signer is valid for the message
action, err = ag.checkOnchainConsistency(ctx, msg, pin)
if action != core.ActionConfirm {
if action == core.ActionWait || action == core.ActionRetry {
break
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change means that everything from line 487 to line 525 will now run when the action is "reject". The bug was caused by skipping too much of this code in the rejection case.

@codecov-commenter
Copy link

Codecov Report

Merging #1326 (23f1792) into main (13946dd) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1326   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         314      314           
  Lines       21418    21419    +1     
=======================================
+ Hits        21415    21416    +1     
  Misses          3        3           
Impacted Files Coverage Δ
internal/events/aggregator.go 100.00% <100.00%> (ø)

Copy link
Contributor

@peterbroadhurst peterbroadhurst left a comment

Choose a reason for hiding this comment

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

Change looks great. I see where we introduced this in #1251 👍 so this only affects mainline (wanted to double check as it's an important bug fix).

@peterbroadhurst peterbroadhurst merged commit 26f0245 into hyperledger:main May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NextPins table is not always updated for rejected messages
3 participants