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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions internal/events/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -524,8 +524,10 @@ func (ag *aggregator) processMessage(ctx context.Context, manifest *core.BatchMa
}
}

l.Debugf("Attempt dispatch msg=%s broadcastContexts=%v privatePins=%v", msg.Header.ID, unmaskedContexts, msg.Pins)
action, correlator, err = ag.readyForDispatch(ctx, msg, data, manifest.TX.ID, state, pin)
if action == core.ActionConfirm {
l.Debugf("Attempt dispatch msg=%s broadcastContexts=%v privatePins=%v", msg.Header.ID, unmaskedContexts, msg.Pins)
action, correlator, err = ag.readyForDispatch(ctx, msg, data, manifest.TX.ID, state, pin)
}
}

if action == core.ActionRetry {
Expand Down