mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
fix it (#13496)
This commit is contained in:
parent
233aaf2f9e
commit
e610d2a5de
@ -247,7 +247,7 @@ func (bv *ROBlobVerifier) SidecarParentSlotLower() (err error) {
|
||||
// -- i.e. get_checkpoint_block(store, block_header.parent_root, store.finalized_checkpoint.epoch) == store.finalized_checkpoint.root.
|
||||
func (bv *ROBlobVerifier) SidecarDescendsFromFinalized() (err error) {
|
||||
defer bv.recordResult(RequireSidecarDescendsFromFinalized, &err)
|
||||
if !bv.fc.IsCanonical(bv.blob.ParentRoot()) {
|
||||
if !bv.fc.HasNode(bv.blob.ParentRoot()) {
|
||||
return ErrSidecarNotFinalizedDescendent
|
||||
}
|
||||
return nil
|
||||
|
@ -358,7 +358,7 @@ func TestSidecarDescendsFromFinalized(t *testing.T) {
|
||||
_, blobs := util.GenerateTestDenebBlockWithSidecar(t, [32]byte{}, 1, 1)
|
||||
b := blobs[0]
|
||||
t.Run("not canonical", func(t *testing.T) {
|
||||
ini := Initializer{shared: &sharedResources{fc: &mockForkchoicer{IsCanonicalCB: func(r [32]byte) bool {
|
||||
ini := Initializer{shared: &sharedResources{fc: &mockForkchoicer{HasNodeCB: func(r [32]byte) bool {
|
||||
if b.ParentRoot() != r {
|
||||
t.Error("forkchoice.Slot called with unexpected parent root")
|
||||
}
|
||||
@ -369,8 +369,8 @@ func TestSidecarDescendsFromFinalized(t *testing.T) {
|
||||
require.Equal(t, true, v.results.executed(RequireSidecarDescendsFromFinalized))
|
||||
require.NotNil(t, v.results.result(RequireSidecarDescendsFromFinalized))
|
||||
})
|
||||
t.Run("not canonical", func(t *testing.T) {
|
||||
ini := Initializer{shared: &sharedResources{fc: &mockForkchoicer{IsCanonicalCB: func(r [32]byte) bool {
|
||||
t.Run("canonical", func(t *testing.T) {
|
||||
ini := Initializer{shared: &sharedResources{fc: &mockForkchoicer{HasNodeCB: func(r [32]byte) bool {
|
||||
if b.ParentRoot() != r {
|
||||
t.Error("forkchoice.Slot called with unexpected parent root")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user