Skip to content

Commit 718aadf

Browse files
committed
Fix tests and remove duplicate _WITHDRAWAL_PREFIX definition
1 parent aa65fd7 commit 718aadf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

specs/electra/beacon-chain.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ The following values are (non-configurable) constants used throughout the specif
128128

129129
| Name | Value |
130130
| - | - |
131-
| `BLS_WITHDRAWAL_PREFIX` | `Bytes1('0x00')` |
132-
| `ETH1_ADDRESS_WITHDRAWAL_PREFIX` | `Bytes1('0x01')` |
133131
| `COMPOUNDING_WITHDRAWAL_PREFIX` | `Bytes1('0x02')` |
134132

135133
### Domains

tests/core/pyspec/eth2spec/test/phase0/genesis/test_initialization.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ def test_initialize_beacon_state_some_small_balances(spec):
105105
assert state.eth1_data.deposit_count == len(deposits)
106106
assert state.eth1_data.block_hash == eth1_block_hash
107107
# only main deposits participate to the active balance
108-
assert spec.get_total_active_balance(state) == main_deposit_count * max_effective_balance
108+
# NOTE: they are pre-ELECTRA deposits with BLS_WITHDRAWAL_PREFIX,
109+
# so `MAX_EFFECTIVE_BALANCE` is used
110+
assert spec.get_total_active_balance(state) == main_deposit_count * spec.MAX_EFFECTIVE_BALANCE
109111

110112
# yield state
111113
yield 'state', state

0 commit comments

Comments
 (0)