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
extern crate disarray_ledger;
use disarray_ledger::{blocks::Block, transactions::SignedTransaction};
use scsys::prelude::H256;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub enum Message {
Ping(String),
Pong(String),
NewBlockHashes(Vec<H256>),
GetBlocks(Vec<H256>),
Blocks(Vec<Block>),
NewTransactionHashes(Vec<H256>),
GetTransactions(Vec<H256>),
Transactions(Vec<SignedTransaction>),
SPVGetChain(),
SPVChain(Vec<Block>),
SPVVerifyTxn(H256, H256),
SPVVerifyRandomTxn(),
SPVTxnProof(H256, H256, H256, Vec<H256>, usize, usize),
FlyGetChain(),
FlyVerifyRandomTxn(),
}