diff --git a/beacon/blsync/block_sync.go b/beacon/blsync/block_sync.go index b5d16e6fa8..0e4109dd3c 100755 --- a/beacon/blsync/block_sync.go +++ b/beacon/blsync/block_sync.go @@ -138,6 +138,6 @@ func (s *beaconBlockSync) updateEventFeed() { } s.chainHeadFeed.Send(types.ChainHeadEvent{ HeadBlock: engine.BlockToExecutableData(execBlock, nil, nil).ExecutionPayload, - Finalized: common.Hash(finality.Finalized.PayloadHeader.BlockHash), + Finalized: common.Hash(finality.Finalized.PayloadHeader.BlockHash()), }) } diff --git a/beacon/blsync/block_sync_test.go b/beacon/blsync/block_sync_test.go index cd5c24ebf7..a5e9bd3766 100644 --- a/beacon/blsync/block_sync_test.go +++ b/beacon/blsync/block_sync_test.go @@ -23,7 +23,6 @@ import ( "github.com/ethereum/go-ethereum/beacon/light/sync" "github.com/ethereum/go-ethereum/beacon/types" "github.com/ethereum/go-ethereum/event" - "github.com/protolambda/zrnt/eth2/beacon/capella" "github.com/protolambda/zrnt/eth2/beacon/deneb" ) @@ -133,9 +132,10 @@ func (h *testHeadTracker) ValidatedHead() (types.SignedHeader, bool) { // TODO add test case for finality func (h *testHeadTracker) ValidatedFinality() (types.FinalityUpdate, bool) { + finalized := types.NewExecutionHeader(new(deneb.ExecutionPayloadHeader)) return types.FinalityUpdate{ Attested: types.HeaderWithExecProof{Header: h.validated.Header}, - Finalized: types.HeaderWithExecProof{PayloadHeader: &capella.ExecutionPayloadHeader{}}, + Finalized: types.HeaderWithExecProof{PayloadHeader: finalized}, Signature: h.validated.Signature, SignatureSlot: h.validated.SignatureSlot, }, h.validated.Header != (types.Header{})