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

Drop redundant error #475

Merged
merged 1 commit into from
Aug 20, 2024
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
12 changes: 6 additions & 6 deletions ssv/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ func (b *BaseRunner) basePreConsensusMsgProcessing(runner Runner, psigMsgs *type
return false, nil, errors.Wrap(err, "invalid pre-consensus message")
}

hasQuorum, roots, err := b.basePartialSigMsgProcessing(psigMsgs, b.State.PreConsensusContainer)
return hasQuorum, roots, errors.Wrap(err, "could not process pre-consensus partial signature msg")
hasQuorum, roots := b.basePartialSigMsgProcessing(psigMsgs, b.State.PreConsensusContainer)
return hasQuorum, roots, nil
}

// baseConsensusMsgProcessing is a base func that all runner implementation can call for processing a consensus msg
Expand Down Expand Up @@ -160,15 +160,15 @@ func (b *BaseRunner) basePostConsensusMsgProcessing(runner Runner, psigMsgs *typ
return false, nil, errors.Wrap(err, "invalid post-consensus message")
}

hasQuorum, roots, err := b.basePartialSigMsgProcessing(psigMsgs, b.State.PostConsensusContainer)
return hasQuorum, roots, errors.Wrap(err, "could not process post-consensus partial signature msg")
hasQuorum, roots := b.basePartialSigMsgProcessing(psigMsgs, b.State.PostConsensusContainer)
return hasQuorum, roots, nil
}

// basePartialSigMsgProcessing adds a validated (without signature verification) partial msg to the container, checks for quorum and returns true (and roots) if quorum exists
func (b *BaseRunner) basePartialSigMsgProcessing(
psigMsgs *types.PartialSignatureMessages,
container *PartialSigContainer,
) (bool, [][32]byte, error) {
) (bool, [][32]byte) {
roots := make([][32]byte, 0)
anyQuorum := false
for _, msg := range psigMsgs.Messages {
Expand All @@ -190,7 +190,7 @@ func (b *BaseRunner) basePartialSigMsgProcessing(
}
}

return anyQuorum, roots, nil
return anyQuorum, roots
}

// didDecideCorrectly returns true if the expected consensus instance decided correctly
Expand Down