diff --git a/teos/src/carrier.rs b/teos/src/carrier.rs index c874bfc..6690c72 100644 --- a/teos/src/carrier.rs +++ b/teos/src/carrier.rs @@ -190,7 +190,7 @@ mod tests { use teos_common::test_utils::{TXID_HEX, TX_HEX}; use bitcoin::consensus; - use bitcoin::hashes::Hash; + use bitcoin::hashes::hex::FromHex; use bitcoincore_rpc::Auth; diff --git a/teos/src/tx_index.rs b/teos/src/tx_index.rs index 3384243..6672fce 100644 --- a/teos/src/tx_index.rs +++ b/teos/src/tx_index.rs @@ -342,7 +342,7 @@ mod tests { // Store the last block to use it for an update and the first to check eviction // Notice that the list of blocks is ordered from last to first. let last_block = last_n_blocks.remove(0); - let first_block = last_n_blocks.last().unwrap().deref().clone(); + let first_block = last_n_blocks.last().unwrap().deref(); // Init the cache with the 6 block before the last let mut cache = TxIndex::new(&last_n_blocks, height); @@ -383,7 +383,7 @@ mod tests { ); // Check that the data from the first block has been evicted - let tx = match first_block.deref() { + let tx = match first_block { lightning_block_sync::BlockData::FullBlock(b) => b.txdata[0].clone(), lightning_block_sync::BlockData::HeaderOnly(_) => { panic!("Expected FullBlock") @@ -391,7 +391,7 @@ mod tests { }; assert!(!cache.contains_key(&Locator::new(tx.txid()))); - let block_hash = match first_block.deref() { + let block_hash = match first_block { lightning_block_sync::BlockData::FullBlock(b) => b.header.block_hash(), lightning_block_sync::BlockData::HeaderOnly(h) => h.block_hash(), };