forked from godwokenrises/godwoken
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_mode.rs
34 lines (31 loc) · 804 Bytes
/
test_mode.rs
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
use ckb_jsonrpc_types::{Uint32, Uint64};
use serde::{Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Debug)]
#[serde(rename_all = "snake_case")]
pub enum ShouldProduceBlock {
Yes,
YesIfFull,
No,
}
#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Debug)]
#[serde(rename_all = "snake_case")]
pub enum ChallengeType {
TxExecution,
TxSignature,
WithdrawalSignature,
}
#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Debug)]
#[serde(rename_all = "snake_case")]
pub enum TestModePayload {
None,
BadBlock {
target_index: Uint32,
target_type: ChallengeType,
},
Challenge {
block_number: Uint64,
target_index: Uint32,
target_type: ChallengeType,
},
WaitForChallengeMaturity,
}