Skip to content

Commit

Permalink
Use SafeMath in getOffchainStorageRoots (#9026)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes authored and martinvol committed May 13, 2022
1 parent 66c86f8 commit bcf6aa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/protocol/contracts/common/Accounts.sol
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ contract Accounts is
uint256 numberRoots = offchainStorageRoots[account].length;
uint256 totalLength = 0;
for (uint256 i = 0; i < numberRoots; i++) {
totalLength += offchainStorageRoots[account][i].length;
totalLength = totalLength.add(offchainStorageRoots[account][i].length);
}

bytes memory concatenated = new bytes(totalLength);
Expand Down

0 comments on commit bcf6aa1

Please sign in to comment.