Skip to content

Commit

Permalink
cleaned up hash function
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidu28 committed Nov 18, 2023
1 parent 15fdce2 commit 913cfa1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/contracts/pods/EigenPod.sol
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,7 @@ contract EigenPod is IEigenPod, Initializable, ReentrancyGuardUpgradeable, Eigen

function _calculateValidatorPubkeyHash(bytes memory validatorPubkey) internal view returns(bytes32){
require(validatorPubkey.length == 48, "EigenPod._calculateValidatorPubkeyHash must be a 48-byte BLS public key");
bytes16 zeroPadding = bytes16(0);
bytes memory paddedPubkey = abi.encodePacked(validatorPubkey, zeroPadding);
return sha256(paddedPubkey);
return sha256(abi.encodePacked(validatorPubkey, bytes16(0)));
}

/**
Expand Down

0 comments on commit 913cfa1

Please sign in to comment.