Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Move hash logic out of primitives #172

Merged
merged 1 commit into from
Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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