mirror of
https://gitlab.com/pulsechaincom/staking-deposit-cli.git
synced 2025-01-10 21:11:21 +00:00
Update credential validation
This commit is contained in:
parent
d0898207c5
commit
b152172fc4
@ -60,10 +60,10 @@ def validate_deposit(deposit_data_dict: Dict[str, Any], credential: Credential)
|
||||
# Verify withdrawal credential
|
||||
if len(withdrawal_credentials) != 32:
|
||||
return False
|
||||
if withdrawal_credentials[:1] == BLS_WITHDRAWAL_PREFIX:
|
||||
if withdrawal_credentials[:1] == BLS_WITHDRAWAL_PREFIX == credential.withdrawal_prefix:
|
||||
if withdrawal_credentials[1:] != SHA256(credential.withdrawal_pk)[1:]:
|
||||
return False
|
||||
elif withdrawal_credentials[:1] == ETH1_ADDRESS_WITHDRAWAL_PREFIX:
|
||||
elif withdrawal_credentials[:1] == ETH1_ADDRESS_WITHDRAWAL_PREFIX == credential.withdrawal_prefix:
|
||||
if withdrawal_credentials[1:12] != b'\x00' * 11:
|
||||
return False
|
||||
if credential.eth1_withdrawal_address is None:
|
||||
|
Loading…
Reference in New Issue
Block a user