2021-03-23 18:55:11 +01:00
|
|
|
use crate::{Bytes, Keystore};
|
2021-03-06 21:28:06 +01:00
|
|
|
|
2021-01-30 14:18:37 +01:00
|
|
|
#[derive(Clone, PartialEq, Debug)]
|
|
|
|
|
pub enum Event {
|
|
|
|
|
MinerStarted,
|
2021-03-25 20:55:09 +01:00
|
|
|
MinerStopped { success: bool, full: bool },
|
2021-01-30 14:18:37 +01:00
|
|
|
KeyGeneratorStarted,
|
2021-03-25 20:55:09 +01:00
|
|
|
KeyGeneratorStopped { success: bool },
|
2021-03-10 22:21:50 +01:00
|
|
|
KeyCreated { path: String, public: String, hash: String },
|
|
|
|
|
KeyLoaded { path: String, public: String, hash: String },
|
|
|
|
|
KeySaved { path: String, public: String, hash: String },
|
2021-01-30 14:18:37 +01:00
|
|
|
NewBlockReceived,
|
2021-03-16 18:16:31 +01:00
|
|
|
BlockchainChanged { index: u64 },
|
2021-01-30 14:18:37 +01:00
|
|
|
ActionStopMining,
|
2021-03-23 18:55:11 +01:00
|
|
|
ActionMineLocker { index: u64, hash: Bytes, keystore: Box<Keystore> },
|
|
|
|
|
ActionQuit,
|
2021-02-28 22:17:03 +01:00
|
|
|
NetworkStatus { nodes: usize, blocks: u64 },
|
|
|
|
|
Syncing { have: u64, height: u64 },
|
|
|
|
|
SyncFinished,
|
2021-01-30 14:18:37 +01:00
|
|
|
}
|