Skip to content

Commit 1604d8c

Browse files
committed
fix clippy warnings
1 parent 981da5c commit 1604d8c

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

crates/bitcoin-da/src/helpers/builders/body_builders.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ pub fn create_inscription_type_0(
270270
if reveal_hash.starts_with(reveal_tx_prefix) {
271271
// check if inscription locked to the correct address
272272
let recovery_key_pair = key_pair.tap_tweak(SECP256K1, merkle_root);
273-
let (x_only_pub_key, _parity) = recovery_key_pair.to_inner().x_only_public_key();
273+
let (x_only_pub_key, _parity) = recovery_key_pair.to_keypair().x_only_public_key();
274274
assert_eq!(
275275
Address::p2tr_tweaked(
276276
TweakedPublicKey::dangerous_assume_tweaked(x_only_pub_key),
@@ -445,7 +445,7 @@ pub fn create_inscription_type_1(
445445
// check if inscription locked to the correct address
446446
let recovery_key_pair = key_pair.tap_tweak(SECP256K1, merkle_root);
447447
let (x_only_pub_key, _parity) =
448-
recovery_key_pair.to_inner().x_only_public_key();
448+
recovery_key_pair.to_keypair().x_only_public_key();
449449
assert_eq!(
450450
Address::p2tr_tweaked(
451451
TweakedPublicKey::dangerous_assume_tweaked(x_only_pub_key),
@@ -636,7 +636,7 @@ pub fn create_inscription_type_1(
636636
if reveal_hash.starts_with(reveal_tx_prefix) {
637637
// check if inscription locked to the correct address
638638
let recovery_key_pair = key_pair.tap_tweak(SECP256K1, merkle_root);
639-
let (x_only_pub_key, _parity) = recovery_key_pair.to_inner().x_only_public_key();
639+
let (x_only_pub_key, _parity) = recovery_key_pair.to_keypair().x_only_public_key();
640640
assert_eq!(
641641
Address::p2tr_tweaked(
642642
TweakedPublicKey::dangerous_assume_tweaked(x_only_pub_key),
@@ -810,7 +810,7 @@ pub fn create_inscription_type_3(
810810
if reveal_hash.starts_with(reveal_tx_prefix) {
811811
// check if inscription locked to the correct address
812812
let recovery_key_pair = key_pair.tap_tweak(SECP256K1, merkle_root);
813-
let (x_only_pub_key, _parity) = recovery_key_pair.to_inner().x_only_public_key();
813+
let (x_only_pub_key, _parity) = recovery_key_pair.to_keypair().x_only_public_key();
814814
assert_eq!(
815815
Address::p2tr_tweaked(
816816
TweakedPublicKey::dangerous_assume_tweaked(x_only_pub_key),
@@ -991,7 +991,7 @@ pub fn create_inscription_type_4(
991991
if reveal_hash.starts_with(reveal_tx_prefix) {
992992
// check if inscription locked to the correct address
993993
let recovery_key_pair = key_pair.tap_tweak(SECP256K1, merkle_root);
994-
let (x_only_pub_key, _parity) = recovery_key_pair.to_inner().x_only_public_key();
994+
let (x_only_pub_key, _parity) = recovery_key_pair.to_keypair().x_only_public_key();
995995
assert_eq!(
996996
Address::p2tr_tweaked(
997997
TweakedPublicKey::dangerous_assume_tweaked(x_only_pub_key),

crates/bitcoin-da/src/helpers/builders/test_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub fn test_create_single_chunk(
142142
if reveal_hash.starts_with(reveal_tx_prefix) {
143143
// check if inscription locked to the correct address
144144
let recovery_key_pair = key_pair.tap_tweak(SECP256K1, merkle_root);
145-
let (x_only_pub_key, _parity) = recovery_key_pair.to_inner().x_only_public_key();
145+
let (x_only_pub_key, _parity) = recovery_key_pair.to_keypair().x_only_public_key();
146146
assert_eq!(
147147
Address::p2tr_tweaked(
148148
TweakedPublicKey::dangerous_assume_tweaked(x_only_pub_key),
@@ -303,7 +303,7 @@ pub fn test_create_single_aggregate(
303303
if reveal_hash.starts_with(reveal_tx_prefix) {
304304
// check if inscription locked to the correct address
305305
let recovery_key_pair = key_pair.tap_tweak(SECP256K1, merkle_root);
306-
let (x_only_pub_key, _parity) = recovery_key_pair.to_inner().x_only_public_key();
306+
let (x_only_pub_key, _parity) = recovery_key_pair.to_keypair().x_only_public_key();
307307
assert_eq!(
308308
Address::p2tr_tweaked(
309309
TweakedPublicKey::dangerous_assume_tweaked(x_only_pub_key),

crates/bitcoin-da/src/helpers/parsers.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ pub fn parse_relevant_transaction(tx: &Transaction) -> Result<ParsedTransaction,
185185
fn get_script(tx: &Transaction) -> Result<&Script, ParserError> {
186186
tx.input[0]
187187
.witness
188-
.tapscript()
188+
.taproot_leaf_script()
189+
.map(|leaf_script| leaf_script.script)
189190
.ok_or(ParserError::NonTapscriptWitness)
190191
}
191192

crates/bitcoin-da/src/network_constants.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ pub fn get_network_constants(network: &bitcoin::Network) -> NetworkConstants {
4343
bitcoin::Network::Testnet | bitcoin::Network::Testnet4 => TESTNET4_CONSTANTS,
4444
bitcoin::Network::Signet => SIGNET_CONSTANTS,
4545
bitcoin::Network::Regtest => REGTEST_CONSTANTS,
46-
_ => unreachable!("Unsupported network"),
4746
}
4847
}
4948

crates/sequencer/src/utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
use alloy_network::eip2718::Decodable2718;
44
use alloy_primitives::Bytes;
5-
use reth_primitives::transaction::SignedTransaction;
65
use reth_primitives::{PooledTransaction, Recovered};
76
use reth_rpc_eth_types::error::{EthApiError, EthResult};
87

0 commit comments

Comments
 (0)