Skip to content

Commit

Permalink
Don't track processRegistryUpdates normalcase (#3024)
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion authored Aug 26, 2021
1 parent 28ea8ab commit 545b2e5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ describe("phase0 processRegistryUpdates", () => {
setBenchOpts({maxMs: 60 * 1000, minRuns: 5});

const vc = numValidators;
const testCases: {id: string; lengths: IndicesLengths}[] = [
const testCases: {id: string; notTrack?: boolean; lengths: IndicesLengths}[] = [
// Normal (optimal) mainnet network conditions: No effectiveBalance is udpated
{
id: "normalcase",
notTrack: true,
lengths: {
indicesToEject: 0,
indicesEligibleForActivationQueue: 0,
Expand Down Expand Up @@ -52,9 +53,10 @@ describe("phase0 processRegistryUpdates", () => {
// Provide flat `epochProcess.balances` + flat `epochProcess.validators`
// which will it update validators tree

for (const {id, lengths} of testCases) {
for (const {id, notTrack, lengths} of testCases) {
itBench<StateEpoch, StateEpoch>({
id: `phase0 processRegistryUpdates - ${vc} ${id}`,
threshold: notTrack ? Infinity : undefined,
before: () => getRegistryUpdatesTestData(vc, lengths),
beforeEach: ({state, epochProcess}) => ({state: state.clone(), epochProcess}),
fn: ({state, epochProcess}) => allForks.processRegistryUpdates(state, epochProcess),
Expand Down

0 comments on commit 545b2e5

Please sign in to comment.