Skip to content

Commit

Permalink
fix: spec test bug where shufflingCache is present from BeaconChain c…
Browse files Browse the repository at this point in the history
…onstructor
  • Loading branch information
matthewkeil committed Nov 28, 2024
1 parent e3ea7c3 commit 4d22fd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/state-transition/src/cache/epochCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,10 @@ export class EpochCache {
this.shufflingCache
.get(epochAfterUpcoming, this.nextDecisionRoot)
.then((shuffling) => {
if (!shuffling) {
throw new Error("EpochShuffling not returned from get in afterProcessEpoch");
}
this.nextShuffling = shuffling;
this.nextShuffling = shuffling
? shuffling
: // in some spec tests the BeaconChain class is used and it creates a ShufflingCache
computeEpochShuffling(state, this.nextActiveIndices, epochAfterUpcoming);
})
.catch((err) => {
this.shufflingCache?.logger?.error(
Expand Down

0 comments on commit 4d22fd8

Please sign in to comment.