Skip to content

Commit

Permalink
clarify stack too deep workaround - round 2
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-schultz committed Oct 10, 2024
1 parent 9a962ed commit f49fe5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/validator-manager/ValidatorMessages.sol
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ library ValidatorMessages {
/**
* @notice Unpacks a byte array as a RegisterSubnetValidatorMessage message.
* The message format specification is the same as the one used in above for packing.
* @dev Individual fields are unpacked in their own scopes to avoid stack too deep errors.
*
* @param input The byte array to unpack.
* @return the unpacked ValidationPeriod.
Expand All @@ -271,6 +270,7 @@ library ValidatorMessages {
ValidationPeriod memory validation;

// Unpack the codec ID
// Individual fields are unpacked in their own scopes to avoid stack too deep errors.
{
uint16 codecID;
for (uint256 i; i < 2; ++i) {
Expand Down

0 comments on commit f49fe5f

Please sign in to comment.