mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-25 13:07:18 +00:00
Fix early return from DepositLog parsing (#1382)
## Issue Addressed N/A ## Proposed Changes When parsing deposit logs, we were returning an error in case `PublicKeyBytes` or `SignatureBytes` didn't convert to valid bls `PublicKey` or `Signature` types. This would stall our import of deposit logs. Fixes this by returning `signature_is_valid` as `false` in `DepositLog` if the bytes are invalid `PublicKey/Signature` types. Tested this fix on the Onyx deposit contract where the bug was observed and it works correctly as expected.
This commit is contained in:
parent
41f7547645
commit
3a888d6ef3
@ -63,9 +63,8 @@ impl DepositLog {
|
||||
.map_err(|e| format!("Invalid signature ssz: {:?}", e))?,
|
||||
};
|
||||
|
||||
let deposit_signature_message = deposit_pubkey_signature_message(&deposit_data, spec)
|
||||
.ok_or_else(|| "Unable to prepare deposit signature verification".to_string())?;
|
||||
let signature_is_valid = deposit_signature_set(&deposit_signature_message).is_valid();
|
||||
let signature_is_valid = deposit_pubkey_signature_message(&deposit_data, spec)
|
||||
.map_or(false, |msg| deposit_signature_set(&msg).is_valid());
|
||||
|
||||
Ok(DepositLog {
|
||||
deposit_data,
|
||||
|
Loading…
Reference in New Issue
Block a user