Advertisement
Guest User

Untitled

a guest
Aug 26th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. function newAnchor(
  2. bytes32 root,
  3. uint height,
  4. uint[] memory signers,
  5. uint8[] memory vs,
  6. bytes32[] memory rs,
  7. bytes32[] memory ss
  8. ) public {
  9. require(height > _anchorHeight + _tAnchor, "Next anchor height not reached");
  10. bytes32 message = keccak256(abi.encodePacked(root, height, _nonce, _contractId, "R"));
  11. validateSignatures(message, signers, vs, rs, ss);
  12. _anchorRoot = root;
  13. _anchorHeight = height;
  14. _nonce += 1;
  15. emit anchorEvent(root, height);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement