start at enforcement

This commit is contained in:
Hardhat Chad
2024-03-15 02:37:02 +00:00
parent 1328db6c6d
commit 7aec07ae6d
4 changed files with 26 additions and 14 deletions

View File

@@ -5,18 +5,20 @@ use thiserror::Error;
#[derive(Debug, Error, Clone, Copy, PartialEq, Eq, IntoPrimitive)]
#[repr(u32)]
pub enum OreError {
#[error("The epoch is still active and cannot be reset")]
EpochActive = 0,
#[error("The start time has not passed yet")]
NotStarted = 0,
#[error("The epoch has ended and needs reset")]
EpochEnded = 1,
NeedsReset = 1,
#[error("The epoch is active and cannot be reset at this time")]
InvalidReset = 2,
#[error("The provided hash was invalid")]
InvalidHash = 2,
InvalidHash = 3,
#[error("The provided hash does not satisfy the difficulty requirement")]
InsufficientHashDifficulty = 3,
InsufficientHashDifficulty = 4,
#[error("The bus has insufficient rewards to mine at this time")]
InsufficientBusRewards = 4,
InsufficientBusRewards = 5,
#[error("The claim amount cannot be larger than the claimable rewards")]
InvalidClaimAmount = 5,
InvalidClaimAmount = 6,
}
impl From<OreError> for ProgramError {