don't clear validator change subpools after creating each block (#4704)

* don't clear validator change subpools after creating each block

* remove now-spurious tests of removed behavior
This commit is contained in:
tersec 2023-03-09 16:19:36 +00:00 committed by GitHub
parent a47f0b054e
commit 8625704dde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 11 deletions

View File

@ -228,8 +228,6 @@ proc getValidatorChangeMessagesForBlock(
if not output.add validator_change_message:
break
subpool.clear()
proc getBeaconBlockValidatorChanges*(
pool: var ValidatorChangePool, cfg: RuntimeConfig, state: ForkyBeaconState):
BeaconBlockValidatorChanges =

View File

@ -91,8 +91,6 @@ suite "Validator change pool testing suite":
pool[].getBeaconBlockValidatorChanges(
cfg, forkyState.data).proposer_slashings.lenu64 ==
min(i + 1, MAX_PROPOSER_SLASHINGS)
pool[].getBeaconBlockValidatorChanges(
cfg, forkyState.data).proposer_slashings.len == 0
test "addValidatorChangeMessage/getAttesterSlashingMessage":
for i in 0'u64 .. MAX_ATTESTER_SLASHINGS + 5:
@ -114,8 +112,6 @@ suite "Validator change pool testing suite":
pool[].getBeaconBlockValidatorChanges(
cfg, forkyState.data).attester_slashings.lenu64 ==
min(i + 1, MAX_ATTESTER_SLASHINGS)
pool[].getBeaconBlockValidatorChanges(
cfg, forkyState.data).attester_slashings.len == 0
test "addValidatorChangeMessage/getVoluntaryExitMessage":
# Need to advance state or it will not accept voluntary exits
@ -144,8 +140,6 @@ suite "Validator change pool testing suite":
pool[].getBeaconBlockValidatorChanges(
cfg, forkyState.data).voluntary_exits.lenu64 ==
min(i + 1, MAX_VOLUNTARY_EXITS)
pool[].getBeaconBlockValidatorChanges(
cfg, forkyState.data).voluntary_exits.len == 0
test "addValidatorChangeMessage/getBlsToExecutionChange (pre-capella)":
# Need to advance state or it will not accept voluntary exits
@ -217,9 +211,6 @@ suite "Validator change pool testing suite":
# Ensure priority of API to gossip messages is observed
allIt(priorityMessages, pool[].isSeen(it))
pool[].getBeaconBlockValidatorChanges(
cfg, forkyState.data).bls_to_execution_changes.len == 0
test "pre-pre-fork voluntary exit":
var
cache: StateCache