remove incorrect exit condition in get_attestation_details(...) (#416)

* remove incorrect exit condition in get_attestation_details(...)

* enable historical batch unit test, which now passes
This commit is contained in:
Dustin Brody 2019-09-09 13:10:03 +00:00 committed by Mamy Ratsimbazafy
parent 3f446e6383
commit a4b4c89539
2 changed files with 1 additions and 8 deletions

View File

@ -350,10 +350,6 @@ func get_attestation_deltas(state: BeaconState, stateCache: var StateCache):
else:
penalties[index] += get_base_reward(state, index)
# Early-out not explicitly in spec
if matching_source_attestations.len == 0:
return (rewards, penalties)
# Proposer and inclusion delay micro-rewards
## This depends on matching_source_attestations being an indexable seq, not a
## set, hash table, etc.

View File

@ -99,10 +99,7 @@ suite "Official - Sanity - Blocks " & preset():
runValidTest("Voluntary exit", voluntary_exit, 2)
runValidTest("Balance-driven status transitions", balance_driven_status_transitions, 1)
when false: # TODO: `stateRef3946003.balances[idx3953625] == postRef3946005.balances[idx3953625]`
# stateRef3946003.balances[0] = 31998855136
# postRef3946005.balances[0] = 31997418334
runValidTest("Historical batch", historical_batch, 1)
runValidTest("Historical batch", historical_batch, 1)
when false: # TODO: `stateRef3870603.block_roots[idx3874628] == postRef3870605.block_roots[idx3874628]`
# stateRef3856003.block_roots[16] = 06013007F8A1D4E310344192C5DF6157B1F9F0F5B3A8404103ED822DF47CD85D