Merge pull request #3629 from StefanBratanov/eip_6110_rename_function

EIP-6110 rename `get_eth1_deposit_count` function
This commit is contained in:
Hsiao-Wei Wang 2024-04-05 06:02:20 +08:00 committed by GitHub
commit 6cfa8f713e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ Please see related Beacon Chain doc before continuing and use them as a referenc
The expected number of deposits MUST be changed from `min(MAX_DEPOSITS, eth1_data.deposit_count - state.eth1_deposit_index)` to the result of the following function: The expected number of deposits MUST be changed from `min(MAX_DEPOSITS, eth1_data.deposit_count - state.eth1_deposit_index)` to the result of the following function:
```python ```python
def get_eth1_deposit_count(state: BeaconState) -> uint64: def get_eth1_pending_deposit_count(state: BeaconState) -> uint64:
eth1_deposit_index_limit = min(state.eth1_data.deposit_count, state.deposit_receipts_start_index) eth1_deposit_index_limit = min(state.eth1_data.deposit_count, state.deposit_receipts_start_index)
if state.eth1_deposit_index < eth1_deposit_index_limit: if state.eth1_deposit_index < eth1_deposit_index_limit:
return min(MAX_DEPOSITS, eth1_deposit_index_limit - state.eth1_deposit_index) return min(MAX_DEPOSITS, eth1_deposit_index_limit - state.eth1_deposit_index)