File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
contracts/src/bridge/merkle Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ contract MerkleProof {
48
48
*/
49
49
function calculateRoot (bytes32 [] memory proof , bytes32 leaf ) internal pure returns (bytes32 ) {
50
50
uint256 proofLength = proof.length ;
51
- require (proofLength <= 32 , "Invalid Proof " );
51
+ require (proofLength <= 64 , "Invalid Proof " );
52
52
bytes32 h = leaf;
53
53
for (uint256 i = 0 ; i < proofLength; i++ ) {
54
54
bytes32 proofElement = proof[i];
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ contract MerkleTreeHistory {
21
21
// ***************************** //
22
22
23
23
// merkle tree representation
24
- // supports 2^32-1 messages.
25
- bytes32 [32 ] public branch;
24
+ // supports 2^64 messages.
25
+ bytes32 [64 ] public branch;
26
26
uint256 public count;
27
27
28
28
// block number => merkle root history
@@ -45,7 +45,7 @@ contract MerkleTreeHistory {
45
45
uint256 size = count;
46
46
uint256 hashBitField = (size ^ (size - 1 )) & size;
47
47
48
- for (uint256 height = 0 ; height < 32 ; height++ ) {
48
+ for (uint256 height = 0 ; height < 64 ; height++ ) {
49
49
if ((hashBitField & 1 ) == 1 ) {
50
50
branch[height] = leaf;
51
51
return ;
You can’t perform that action at this time.
0 commit comments