function constructor(
uint64 nRoots
) public
Create a root store.
Name | Type | Description |
nRoots | uint64 | The maximum number of roots to store |
function _addRoot(
uint256 newRoot
) internal
Add a root value. Only keep the latest nRoots ones.
Name | Type | Description |
newRoot | uint256 | The value of the new root |
function _containsRoot(
uint256 root
) internal returns (bool)
Is the root value contained in the store?
Name | Type | Description |
root | uint256 | The root value to find |
Returns | Type | Description |
⇒ | uint256 | True if the root value is in the store, false otherwise |
function _checkContainsRoot(
uint256 root
) internal
Raise an exception if the root is not present in the store.
Name | Type | Description |
root | uint256 | The required root value |