-
-
Notifications
You must be signed in to change notification settings - Fork 449
refactor: remove build() and async shuffling calculation #8688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
fb26c17
4353bb0
27b506f
bbdf692
97a1372
ec2983f
03cb629
c3dbaaa
9ae55bc
f6a425b
58d82a2
382a664
a06d62f
57e6099
6a7d5fe
14a28e9
bc30b36
4828555
7f81ffc
2eb4ee0
f81861d
f3aff93
62bce64
3dc07b8
0681f48
eb05b91
f75cd15
e24b5f3
aa860b5
c2f3801
86b0359
9aad853
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,6 +117,13 @@ export async function importBlock( | |
| // Some block event handlers require state being in state cache so need to do this before emitting EventType.block | ||
| this.regen.processState(blockRootHex, postState); | ||
|
|
||
| const parentEpoch = computeEpochAtSlot(parentBlockSlot); | ||
| if (parentEpoch < blockEpoch && postState.epochCtx.nextShuffling !== null) { | ||
| // current epoch and previous epoch are likely cached in previous states | ||
| this.shufflingCache.set(postState.epochCtx.nextShuffling, postState.epochCtx.nextDecisionRoot); | ||
| this.logger.verbose("Processed shuffling for next epoch", {parentEpoch, blockEpoch, slot: blockSlot}); | ||
| } | ||
|
||
|
|
||
| this.metrics?.importBlock.bySource.inc({source: source.source}); | ||
| this.logger.verbose("Added block to forkchoice and state cache", {slot: blockSlot, root: blockRootHex}); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.