mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-20 15:38:55 +00:00
Rename block_batch_root
to block_summary_root
and state_batch_root
to state_summary_root
This commit is contained in:
parent
1cfabcbe54
commit
dcacb7164f
@ -126,8 +126,8 @@ class HistoricalSummary(Container):
|
||||
`HistoricalSummary` matches the components of the phase0 `HistoricalBatch`
|
||||
making the two hash_tree_root-compatible.
|
||||
"""
|
||||
block_batch_root: Root
|
||||
state_batch_root: Root
|
||||
block_summary_root: Root
|
||||
state_summary_root: Root
|
||||
```
|
||||
|
||||
### Extended Containers
|
||||
@ -315,8 +315,8 @@ def process_historical_summaries_update(state: BeaconState) -> None:
|
||||
next_epoch = Epoch(get_current_epoch(state) + 1)
|
||||
if next_epoch % (SLOTS_PER_HISTORICAL_ROOT // SLOTS_PER_EPOCH) == 0:
|
||||
historical_summary = HistoricalSummary(
|
||||
block_batch_root=hash_tree_root(state.block_roots),
|
||||
state_batch_root=hash_tree_root(state.state_roots),
|
||||
block_summary_root=hash_tree_root(state.block_roots),
|
||||
state_summary_root=hash_tree_root(state.state_roots),
|
||||
)
|
||||
state.historical_summaries.append(historical_summary)
|
||||
```
|
||||
|
@ -23,5 +23,5 @@ def test_historical_summaries_accumulator(spec, state):
|
||||
|
||||
assert len(state.historical_summaries) == len(pre_historical_summaries) + 1
|
||||
summary = state.historical_summaries[len(state.historical_summaries) - 1]
|
||||
assert summary.block_batch_root == state.block_roots.hash_tree_root()
|
||||
assert summary.state_batch_root == state.state_roots.hash_tree_root()
|
||||
assert summary.block_summary_root == state.block_roots.hash_tree_root()
|
||||
assert summary.state_summary_root == state.state_roots.hash_tree_root()
|
||||
|
Loading…
x
Reference in New Issue
Block a user