Skip to content

Commit

Permalink
add back partial eq
Browse files Browse the repository at this point in the history
  • Loading branch information
brady.ouren committed Jul 15, 2024
1 parent 90bf79b commit d8fe669
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
16 changes: 6 additions & 10 deletions src/db/cache/transaction_cache.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
use std::{
collections::{HashMap, VecDeque},
vec,
};

use bitcoin::ScriptBuf;
use chainhook_sdk::utils::Context;
use maplit::hashmap;
use ordinals::{Cenotaph, Edict, Etching, Rune, RuneId};
use std::{
collections::{HashMap, VecDeque},
vec,
};

use crate::{
db::{
Expand Down Expand Up @@ -413,10 +412,7 @@ mod test {
use ordinals::{Edict, Etching, Rune, Terms};

use crate::db::{
cache::{
input_rune_balance::InputRuneBalance, transaction_location::TransactionLocation,
utils::is_rune_mintable,
},
cache::{input_rune_balance::InputRuneBalance, transaction_location::TransactionLocation},
models::{db_ledger_operation::DbLedgerOperation, db_rune::DbRune},
};

Expand Down Expand Up @@ -488,7 +484,7 @@ mod test {
// ledger entry is minted with the correct amount
assert_eq!(ledger_entry.amount, Some(db_rune.terms_amount.unwrap()));

// test: minted amount is added to the input runes (`cache.input_runes`)
// minted amount is added to the input runes (`cache.input_runes`)
assert!(cache.input_runes.contains_key(&rune_id));
}

Expand Down
2 changes: 0 additions & 2 deletions src/db/models/db_ledger_entry.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::fmt;

use ordinals::RuneId;
use tokio_postgres::Row;

Expand Down
2 changes: 1 addition & 1 deletion src/db/types/pg_numeric_u128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub fn pg_numeric_bytes_to_u128(raw: &[u8]) -> u128 {
result
}

#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct PgNumericU128(pub u128);

impl ToSql for PgNumericU128 {
Expand Down

0 comments on commit d8fe669

Please sign in to comment.