Skip to content

Commit

Permalink
removed Latestheader
Browse files Browse the repository at this point in the history
  • Loading branch information
Redidacove committed Aug 6, 2024
1 parent a9a9e27 commit 83d74b0
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions beacon-chain/core/blocks/withdrawals_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import (
"github.com/prysmaticlabs/prysm/v5/crypto/bls"
"github.com/prysmaticlabs/prysm/v5/crypto/bls/common"
"github.com/prysmaticlabs/prysm/v5/crypto/hash"
"github.com/prysmaticlabs/prysm/v5/encoding/bytesutil"

// "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil"
"github.com/prysmaticlabs/prysm/v5/encoding/ssz"
enginev1 "github.com/prysmaticlabs/prysm/v5/proto/engine/v1"
ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1"
Expand Down Expand Up @@ -679,7 +680,6 @@ func TestProcessWithdrawals(t *testing.T) {
PendingPartialWithdrawalIndices []primitives.ValidatorIndex
Withdrawals []*enginev1.Withdrawal
PendingPartialWithdrawals []*ethpb.PendingPartialWithdrawal // Electra
LatestExecutionPayloadHeader *enginev1.ExecutionPayloadHeaderEPBS //EPBS
}
type control struct {
NextWithdrawalValidatorIndex primitives.ValidatorIndex
Expand Down Expand Up @@ -1032,21 +1032,18 @@ func TestProcessWithdrawals(t *testing.T) {
},
{
Args: args{
Name: "failure Parent Node is not full",
Name: "failure Parent Node is not full",
NextWithdrawalIndex: 22,
NextWithdrawalValidatorIndex: 4,
FullWithdrawalIndices: []primitives.ValidatorIndex{7, 19, 28, 1},
Withdrawals: []*enginev1.Withdrawal{
fullWithdrawal(7, 22), fullWithdrawal(19, 23), fullWithdrawal(28, 25),
},
LatestExecutionPayloadHeader: &enginev1.ExecutionPayloadHeaderEPBS{
BlockHash: bytesutil.Bytes32(2),
},
},
Control: control{
ExpectedError: false,
},
},
},
}

checkPostState := func(t *testing.T, expected control, st state.BeaconState) {
Expand Down Expand Up @@ -1144,11 +1141,11 @@ func TestProcessWithdrawals(t *testing.T) {
NextWithdrawalValidatorIndex: test.Args.NextWithdrawalValidatorIndex,
NextWithdrawalIndex: test.Args.NextWithdrawalIndex,
PendingPartialWithdrawals: test.Args.PendingPartialWithdrawals,
LatestExecutionPayloadHeader: test.Args.LatestExecutionPayloadHeader,
}
st, err = state_native.InitializeFromProtoUnsafeEpbs(spb)
require.NoError(t, err)
p = nil
default:
t.Fatalf("Add a beacon state setup for version %s", version.String(fork))
}
err = prepareValidators(st, test.Args)
Expand Down

0 comments on commit 83d74b0

Please sign in to comment.