2021-11-01 12:30:35 +01:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8.0;
|
|
|
|
|
|
|
|
import "./Proofs.sol";
|
|
|
|
|
|
|
|
// exposes internal functions of Proofs for testing
|
|
|
|
contract TestProofs is Proofs {
|
2022-03-02 15:44:58 +01:00
|
|
|
constructor(uint256 __period, uint256 __timeout)
|
|
|
|
Proofs(__period, __timeout)
|
|
|
|
// solhint-disable-next-line no-empty-blocks
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function period() public view returns (uint256) {
|
|
|
|
return _period();
|
2021-11-01 12:30:35 +01:00
|
|
|
}
|
|
|
|
|
2022-03-02 15:44:58 +01:00
|
|
|
function timeout() public view returns (uint256) {
|
|
|
|
return _timeout();
|
2021-11-01 12:30:35 +01:00
|
|
|
}
|
|
|
|
|
2022-02-09 14:17:23 +01:00
|
|
|
function end(bytes32 id) public view returns (uint256) {
|
2021-11-03 13:24:50 +01:00
|
|
|
return _end(id);
|
|
|
|
}
|
|
|
|
|
2022-02-09 14:17:23 +01:00
|
|
|
function missed(bytes32 id) public view returns (uint256) {
|
2021-11-01 12:30:35 +01:00
|
|
|
return _missed(id);
|
|
|
|
}
|
|
|
|
|
2022-03-02 15:44:58 +01:00
|
|
|
function expectProofs(bytes32 id, uint256 _duration) public {
|
|
|
|
_expectProofs(id, _duration);
|
2021-11-01 12:30:35 +01:00
|
|
|
}
|
|
|
|
|
2022-02-09 14:17:23 +01:00
|
|
|
function isProofRequired(bytes32 id, uint256 blocknumber)
|
|
|
|
public
|
|
|
|
view
|
2021-11-01 12:30:35 +01:00
|
|
|
returns (bool)
|
|
|
|
{
|
|
|
|
return _isProofRequired(id, blocknumber);
|
|
|
|
}
|
|
|
|
|
|
|
|
function submitProof(
|
|
|
|
bytes32 id,
|
2022-02-09 14:17:23 +01:00
|
|
|
uint256 blocknumber,
|
2021-11-01 12:30:35 +01:00
|
|
|
bool proof
|
2022-02-09 14:17:23 +01:00
|
|
|
) public {
|
2021-11-01 12:30:35 +01:00
|
|
|
_submitProof(id, blocknumber, proof);
|
|
|
|
}
|
|
|
|
|
2022-02-09 14:17:23 +01:00
|
|
|
function markProofAsMissing(bytes32 id, uint256 blocknumber) public {
|
|
|
|
_markProofAsMissing(id, blocknumber);
|
2021-11-01 12:30:35 +01:00
|
|
|
}
|
|
|
|
}
|