Skip to content
Permalink
Browse files

update to the latest version of chain-core

  • Loading branch information...
NicolasDP committed Mar 12, 2019
1 parent 0d5b8d4 commit ed752807ed1b3ec93dada89c63c0c7baea3ad097
Showing with 0 additions and 28 deletions.
  1. +0 −20 cardano/src/block/block.rs
  2. +0 −8 cardano/src/tx.rs
@@ -376,26 +376,6 @@ impl chain_core::property::Deserialize for Block {
}
}

impl chain_core::property::HasTransaction for Block {
type Transaction = TxAux;
fn transactions<'a>(&'a self) -> Box<Iterator<Item = &Self::Transaction> + 'a> {
match self {
Block::BoundaryBlock(_) => Box::new([].iter()),
Block::MainBlock(blk) => Box::new(blk.body.tx.iter()),
}
}

fn for_each_transaction<F>(&self, f: F)
where
F: FnMut(&Self::Transaction),
{
match self {
Block::BoundaryBlock(_) => {}
Block::MainBlock(blk) => blk.body.tx.iter().for_each(f),
}
}
}

// **************************************************************************
// CBOR implementations
// **************************************************************************
@@ -685,7 +685,6 @@ impl chain_core::property::Deserialize for TxAux {
}

impl chain_core::property::Transaction for Tx {
type Id = TxId;
type Input = TxoPointer;
type Output = TxOut;
type Inputs = [TxoPointer];
@@ -697,12 +696,8 @@ impl chain_core::property::Transaction for Tx {
fn outputs(&self) -> &Self::Outputs {
&self.outputs
}
fn id(&self) -> Self::Id {
Tx::id(self)
}
}
impl chain_core::property::Transaction for TxAux {
type Id = TxId;
type Input = TxoPointer;
type Output = TxOut;
type Inputs = [TxoPointer];
@@ -714,9 +709,6 @@ impl chain_core::property::Transaction for TxAux {
fn outputs(&self) -> &Self::Outputs {
&self.tx.outputs
}
fn id(&self) -> Self::Id {
self.tx.id()
}
}

#[cfg(test)]

0 comments on commit ed75280

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