rpctest executable

This commit is contained in:
debris
2016-03-17 11:50:31 +01:00
committed by arkpar
parent 2f411c93fd
commit 7105ed3f61
8 changed files with 115 additions and 1 deletions

View File

@@ -35,6 +35,18 @@ pub struct BlockChain {
pre_state: State,
}
impl BlockChain {
/// Returns genesis block rlp.
pub fn genesis_rlp(&self) -> Vec<u8> {
self.genesis_rlp.clone().into()
}
/// Returns blocks rlp.
pub fn blocks_rlp(&self) -> Vec<Vec<u8>> {
self.blocks.iter().map(|block| block.rlp()).collect()
}
}
#[cfg(test)]
mod tests {
use serde_json;