Fix tests and remove duplicate `_WITHDRAWAL_PREFIX` definition

This commit is contained in:
Hsiao-Wei Wang 2024-06-14 15:43:28 +08:00
parent aa65fd7824
commit 718aadf263
No known key found for this signature in database
GPG Key ID: AE3D6B174F971DE4
2 changed files with 3 additions and 3 deletions

View File

@ -128,8 +128,6 @@ The following values are (non-configurable) constants used throughout the specif
| Name | Value |
| - | - |
| `BLS_WITHDRAWAL_PREFIX` | `Bytes1('0x00')` |
| `ETH1_ADDRESS_WITHDRAWAL_PREFIX` | `Bytes1('0x01')` |
| `COMPOUNDING_WITHDRAWAL_PREFIX` | `Bytes1('0x02')` |
### Domains

View File

@ -105,7 +105,9 @@ def test_initialize_beacon_state_some_small_balances(spec):
assert state.eth1_data.deposit_count == len(deposits)
assert state.eth1_data.block_hash == eth1_block_hash
# only main deposits participate to the active balance
assert spec.get_total_active_balance(state) == main_deposit_count * max_effective_balance
# NOTE: they are pre-ELECTRA deposits with BLS_WITHDRAWAL_PREFIX,
# so `MAX_EFFECTIVE_BALANCE` is used
assert spec.get_total_active_balance(state) == main_deposit_count * spec.MAX_EFFECTIVE_BALANCE
# yield state
yield 'state', state