Skip to content

Commit

Permalink
DRY Block, BlockData, Evidence, Parts
Browse files Browse the repository at this point in the history
  • Loading branch information
liamsi committed May 23, 2020
1 parent 6231dcc commit 3269d58
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions tendermint/src/rpc/event_listener.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Tendermint Websocket event listener client

use crate::{
block::{Commit, Header},
block::Block,
net,
rpc::response::Wrapper,
rpc::Request,
Expand Down Expand Up @@ -190,33 +190,8 @@ pub struct BlockValue {
result_begin_block: ResultBeginBlock,
result_end_block: ResultEndBlock,
}
/// Block
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Block {
header: Header,
data: BlockData,
evidence: Evidence,
last_commit: Commit,
}
///Block Txs
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct BlockData {
txs: Option<serde_json::Value>,
}
///Tendermint evidence
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Evidence {
evidence: Option<serde_json::Value>,
}

/// Block Parts
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Parts {
total: String,
hash: String,
}

/// Begin Blocke Envts
/// Begin Block Events
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct ResultBeginBlock {
events: Vec<TmEvent>,
Expand Down

0 comments on commit 3269d58

Please sign in to comment.