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: unpack errors on ReferenceBlockAttestation #1199

Merged
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
10 changes: 5 additions & 5 deletions x/consensus/keeper/concensus_keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ func (k Keeper) GetMessagesForRelaying(ctx context.Context, queueTypeName string
return msg.GetId() <= valsetUpdatesOnChain[0].GetId()
})

// Filter down to just messages that have neither publicAccessData nor errorData
msgs = slice.Filter(msgs, func(msg types.QueuedSignedMessageI) bool {
return msg.GetPublicAccessData() == nil && msg.GetErrorData() == nil
})

// Filter down to just messages assigned to this validator
msgs = slice.Filter(msgs, func(msg types.QueuedSignedMessageI) bool {
var unpackedMsg evmtypes.TurnstoneMsg
Expand All @@ -194,11 +199,6 @@ func (k Keeper) GetMessagesForRelaying(ctx context.Context, queueTypeName string
return unpackedMsg.GetAssignee() == valAddress.String()
})

// Filter down to just messages that have neither publicAccessData nor errorData
msgs = slice.Filter(msgs, func(msg types.QueuedSignedMessageI) bool {
return msg.GetPublicAccessData() == nil && msg.GetErrorData() == nil
})

if len(msgs) > defaultResponseMessageCount {
msgs = msgs[:defaultResponseMessageCount]
}
Expand Down
Loading