8
8
getEffectiveBalanceIncrementsZeroInactive ,
9
9
altair ,
10
10
computeEpochAtSlot ,
11
+ bellatrix ,
11
12
allForks ,
12
13
} from "@chainsafe/lodestar-beacon-state-transition" ;
13
14
import { IForkChoice , OnBlockPrecachedData , ForkChoiceError , ForkChoiceErrorCode } from "@chainsafe/lodestar-fork-choice" ;
@@ -26,7 +27,8 @@ import {PendingEvents} from "./utils/pendingEvents";
26
27
import { FullyVerifiedBlock } from "./types" ;
27
28
import { SeenAggregatedAttestations } from "../seenCache/seenAggregateAndProof" ;
28
29
import { prepareExecutionPayload } from "../factory/block/body" ;
29
-
30
+ import { IEth1ForBlockProduction } from "../../eth1" ;
31
+ import { BeaconProposerCache } from "../beaconProposerCache" ;
30
32
/**
31
33
* Fork-choice allows to import attestations from current (0) or past (1) epoch.
32
34
*/
@@ -38,7 +40,9 @@ export type ImportBlockModules = {
38
40
stateCache : StateContextCache ;
39
41
checkpointStateCache : CheckpointStateCache ;
40
42
seenAggregatedAttestations : SeenAggregatedAttestations ;
43
+ beaconProposerCache : BeaconProposerCache ;
41
44
lightClientServer : LightClientServer ;
45
+ eth1 : IEth1ForBlockProduction ;
42
46
executionEngine : IExecutionEngine ;
43
47
emitter : ChainEventEmitter ;
44
48
config : IChainForkConfig ;
@@ -270,7 +274,7 @@ export async function issueNextProposerEngineFcU(
270
274
if ( bellatrix . isBellatrixStateType ( prepareState ) ) {
271
275
try {
272
276
const proposerIndex = prepareState . epochCtx . getBeaconProposer ( prepareSlot ) ;
273
- const feeRecipient = chain . executionEngine . proposers . get ( proposerIndex ) ?. feeRecipient ;
277
+ const feeRecipient = chain . beaconProposerCache . get ( proposerIndex ) ;
274
278
if ( feeRecipient ) {
275
279
const finalizedBlockHash = chain . forkChoice . getFinalizedBlock ( ) . executionPayloadBlockHash ?? ZERO_HASH_HEX ;
276
280
return prepareExecutionPayload ( chain , finalizedBlockHash , prepareState , feeRecipient ) ;
0 commit comments