Commit d40468c1 authored by Alina's avatar Alina Committed by GitHub

global root index check (#106)

parent b2ad9408
......@@ -173,9 +173,9 @@ contract OVM_FraudVerifier is Lib_AddressResolver, OVM_FraudContributor, iOVM_Fr
"State transition process must be completed prior to finalization."
);
require(
_postStateRootProof.index == _preStateRootProof.index + 1,
"Invalid post-state root index."
require (
_postStateRootBatchHeader.prevTotalElements + _postStateRootProof.index == _preStateRootBatchHeader.prevTotalElements + _preStateRootProof.index + 1,
"Post-state root global index must equal to the pre state root global index plus one."
);
require(
......
......@@ -274,7 +274,7 @@ describe('OVM_FraudVerifier', () => {
DUMMY_BATCH_HEADERS[0],
batchProof
)
).to.be.revertedWith('Invalid post-state root index.')
).to.be.revertedWith('Post-state root global index must equal to the pre state root global index plus one.')
})
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment