Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function newAnchor(
- bytes32 root,
- uint height,
- uint[] memory signers,
- uint8[] memory vs,
- bytes32[] memory rs,
- bytes32[] memory ss
- ) public {
- require(height > _anchorHeight + _tAnchor, "Next anchor height not reached");
- bytes32 message = keccak256(abi.encodePacked(root, height, _nonce, _contractId, "R"));
- validateSignatures(message, signers, vs, rs, ss);
- _anchorRoot = root;
- _anchorHeight = height;
- _nonce += 1;
- emit anchorEvent(root, height);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement