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
36
37
use anchor_lang::prelude::*;

#[error_code]
pub enum ClockworkError {
    #[msg("This account has already been initialized")]
    AccountAlreadyInitialized,

    #[msg("The provided node is cannot be used for this operation")]
    InvalidNode,

    #[msg("The provided snapshot entry cannot be used for this operation")]
    InvalidSnapshotEntry,

    #[msg("The stake account cannot be used for this operation")]
    InvalidStakeAccount,

    #[msg("One of the provided pool accounts is invalid or missing")]
    InvalidPool,

    #[msg("The registry is locked and may not be updated right now")]
    RegistryLocked,

    #[msg("The registry must be locked for this operation")]
    RegistryMustBeLocked,

    #[msg("The snapshot is not archived")]
    SnapshotNotArchived,

    #[msg("The snapshot is not in progress")]
    SnapshotNotInProgress,

    #[msg("The snapshot is not current")]
    SnapshotNotCurrent,

    #[msg("The snapshot is incomplete")]
    SnapshotIncomplete,
}