Skip to content

Commit

Permalink
chore: Move hash logic out of primitives (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Aug 13, 2022
1 parent bfc46a7 commit d72f9e4
Show file tree
Hide file tree
Showing 12 changed files with 292 additions and 327 deletions.
163 changes: 0 additions & 163 deletions pallas-primitives/src/alonzo/crypto.rs

This file was deleted.

2 changes: 0 additions & 2 deletions pallas-primitives/src/alonzo/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mod model;

pub mod crypto;

#[cfg(feature = "json")]
pub mod json;

Expand Down
67 changes: 0 additions & 67 deletions pallas-primitives/src/babbage/crypto.rs

This file was deleted.

1 change: 0 additions & 1 deletion pallas-primitives/src/babbage/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod crypto;
mod model;

pub use model::*;
72 changes: 0 additions & 72 deletions pallas-primitives/src/byron/crypto.rs

This file was deleted.

3 changes: 1 addition & 2 deletions pallas-primitives/src/byron/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl TxPayload {
mod tests {
use pallas_codec::minicbor;

use crate::{byron::Block, ToHash};
use crate::byron::Block;

type BlockWrapper = (u16, Block);

Expand All @@ -66,7 +66,6 @@ mod tests {
assert!(block.body.tx_payload.len() > 0);

for tx in block.body.tx_payload.iter().take(1) {
println!("{}", tx.transaction.to_hash());
let fee = tx.compute_fee_with_defaults().unwrap();
assert_eq!(fee, 171070);
}
Expand Down
1 change: 0 additions & 1 deletion pallas-primitives/src/byron/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Ledger primitives and cbor codec for the Byron era

mod crypto;
mod fees;
mod model;
mod time;
Expand Down
4 changes: 0 additions & 4 deletions pallas-primitives/src/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,3 @@ where
pub trait ToCanonicalJson {
fn to_json(&self) -> serde_json::Value;
}

pub trait ToHash<const BYTES: usize> {
fn to_hash(&self) -> pallas_crypto::hash::Hash<BYTES>;
}
Loading

0 comments on commit d72f9e4

Please sign in to comment.