Skip to content
Permalink
Browse files

remove HasTransaction from the block

this trait has been remove from the core api
  • Loading branch information...
NicolasDP committed Mar 12, 2019
1 parent ce278e0 commit a7b1a399a8a25dbc5fb64d3417a96f9e5d39f7fb
Showing with 0 additions and 20 deletions.
  1. +0 −20 chain-impl-mockchain/src/block/mod.rs
@@ -174,26 +174,6 @@ impl property::Deserialize for Block {
}
}

impl property::HasTransaction for Block {
type Transaction = SignedTransaction<Address>;
fn transactions<'a>(&'a self) -> Box<Iterator<Item = &SignedTransaction<Address>> + 'a> {
Box::new(self.contents.0.iter().filter_map(|msg| match msg {
Message::Transaction(tx) => Some(tx),
_ => None,
}))
}

fn for_each_transaction<F>(&self, mut f: F)
where
F: FnMut(&Self::Transaction),
{
self.contents.0.iter().for_each(|msg| match msg {
Message::Transaction(tx) => f(tx),
_ => {}
})
}
}

impl property::HasMessages for Block {
type Message = Message;
fn messages<'a>(&'a self) -> Box<Iterator<Item = &Message> + 'a> {

0 comments on commit a7b1a39

Please sign in to comment.
You can’t perform that action at this time.