mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-16 07:26:51 +00:00
mine v2
This commit is contained in:
10
src/error.rs
10
src/error.rs
@@ -5,18 +5,20 @@ use thiserror::Error;
|
||||
#[derive(Debug, Error, Clone, Copy, PartialEq, Eq, IntoPrimitive)]
|
||||
#[repr(u32)]
|
||||
pub enum OreError {
|
||||
#[error("The starting time has not passed yet")]
|
||||
NotStarted = 0,
|
||||
#[error("Mining is paused")]
|
||||
IsPaused = 0,
|
||||
#[error("The epoch has ended and needs reset")]
|
||||
NeedsReset = 1,
|
||||
#[error("The epoch is active and cannot be reset at this time")]
|
||||
ResetTooEarly = 2,
|
||||
#[error("The provided hash was invalid")]
|
||||
HashInvalid = 3,
|
||||
#[error("The provided hash did not satisfy the minimum required difficulty")]
|
||||
DifficultyInsufficient = 3,
|
||||
#[error("The bus does not have enough rewards to issue at this time")]
|
||||
BusRewardsInsufficient = 4,
|
||||
#[error("The claim amount cannot be greater than the claimable rewards")]
|
||||
ClaimTooLarge = 5,
|
||||
#[error("The clock time is invalid")]
|
||||
ClockInvalid = 6,
|
||||
}
|
||||
|
||||
impl From<OreError> for ProgramError {
|
||||
|
||||
Reference in New Issue
Block a user