Skip to content

[chore]: proveUnknownValidatorsToPDG must validate _witnesses length #1618

@tamtamchik

Description

@tamtamchik

Summary

Instead of reverting here when _witnesses.length is 0 nothing happens:

for (uint256 i = 0; i < _witnesses.length; i++) {
    VAULT_HUB.proveUnknownValidatorToPDG(address(_stakingVault()), _witnesses[i]);
}

Expected Behavior

Transaction reverts

Potential Impact

The transaction can be mistakengly counted as successful.

Steps to Reproduce

https://hoodi.etherscan.io/tx/0x1ce0934c79c33dc8c6bdc387fda6f56de094ab0f2e5b8e6707fd0fd1a7a0d7f5

Possible Solutions

No response

Guidelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    polishingStyle improvementsrefactoringQuality improving code changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions