-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathTestBeefyLightClient.sol
More file actions
35 lines (32 loc) · 951 Bytes
/
TestBeefyLightClient.sol
File metadata and controls
35 lines (32 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// SPDX-License-Identifier: Apache-2.0
pragma solidity =0.8.13;
import "../BeefyLightClient.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract TestBeefyLightClient is BeefyLightClient, Ownable {
constructor(
ValidatorRegistry _validatorRegistry,
SimplifiedMMRVerification _mmrVerification,
uint64 _startingBeefyBlock
)
BeefyLightClient(
_validatorRegistry,
_mmrVerification,
_startingBeefyBlock
)
{}
function reset(
uint64 _startingBeefyBlock,
bytes32 _authoritySetRoot,
uint256 _authoritySetLen,
uint64 _authoritySetId
) public onlyOwner {
latestBeefyBlock = _startingBeefyBlock;
latestMMRRoots[0] = bytes32(0);
latestMMRRootIndex = 0;
validatorRegistry.update(
_authoritySetRoot,
_authoritySetLen,
_authoritySetId
);
}
}