mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
5a66807989
* First take at updating everything to v5 * Patch gRPC gateway to use prysm v5 Fix patch * Update go ssz --------- Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
75 lines
2.0 KiB
Go
75 lines
2.0 KiB
Go
package verification
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prysmaticlabs/prysm/v5/consensus-types/blocks"
|
|
)
|
|
|
|
type MockBlobVerifier struct {
|
|
ErrBlobIndexInBounds error
|
|
ErrSlotTooEarly error
|
|
ErrSlotAboveFinalized error
|
|
ErrValidProposerSignature error
|
|
ErrSidecarParentSeen error
|
|
ErrSidecarParentValid error
|
|
ErrSidecarParentSlotLower error
|
|
ErrSidecarDescendsFromFinalized error
|
|
ErrSidecarInclusionProven error
|
|
ErrSidecarKzgProofVerified error
|
|
ErrSidecarProposerExpected error
|
|
cbVerifiedROBlob func() (blocks.VerifiedROBlob, error)
|
|
}
|
|
|
|
func (m *MockBlobVerifier) VerifiedROBlob() (blocks.VerifiedROBlob, error) {
|
|
return m.cbVerifiedROBlob()
|
|
}
|
|
|
|
func (m *MockBlobVerifier) BlobIndexInBounds() (err error) {
|
|
return m.ErrBlobIndexInBounds
|
|
}
|
|
|
|
func (m *MockBlobVerifier) NotFromFutureSlot() (err error) {
|
|
return m.ErrSlotTooEarly
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SlotAboveFinalized() (err error) {
|
|
return m.ErrSlotAboveFinalized
|
|
}
|
|
|
|
func (m *MockBlobVerifier) ValidProposerSignature(_ context.Context) (err error) {
|
|
return m.ErrValidProposerSignature
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarParentSeen(_ func([32]byte) bool) (err error) {
|
|
return m.ErrSidecarParentSeen
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarParentValid(_ func([32]byte) bool) (err error) {
|
|
return m.ErrSidecarParentValid
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarParentSlotLower() (err error) {
|
|
return m.ErrSidecarParentSlotLower
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarDescendsFromFinalized() (err error) {
|
|
return m.ErrSidecarDescendsFromFinalized
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarInclusionProven() (err error) {
|
|
return m.ErrSidecarInclusionProven
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarKzgProofVerified() (err error) {
|
|
return m.ErrSidecarKzgProofVerified
|
|
}
|
|
|
|
func (m *MockBlobVerifier) SidecarProposerExpected(_ context.Context) (err error) {
|
|
return m.ErrSidecarProposerExpected
|
|
}
|
|
|
|
func (*MockBlobVerifier) SatisfyRequirement(_ Requirement) {}
|
|
|
|
var _ BlobVerifier = &MockBlobVerifier{}
|