Skip to content

Commit 5b4f663

Browse files
committed
Replace Script with ScriptBuf where appropriate
1 parent ac75cff commit 5b4f663

File tree

26 files changed

+207
-207
lines changed

26 files changed

+207
-207
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
2121
use bitcoin::blockdata::constants::genesis_block;
2222
use bitcoin::blockdata::transaction::{Transaction, TxOut};
23-
use bitcoin::blockdata::script::{Builder, Script};
23+
use bitcoin::blockdata::script::{Builder, ScriptBuf};
2424
use bitcoin::blockdata::opcodes;
2525
use bitcoin::blockdata::locktime::absolute::LockTime;
2626
use bitcoin::network::constants::Network;
@@ -270,7 +270,7 @@ impl SignerProvider for KeyProvider {
270270
})
271271
}
272272

273-
fn get_destination_script(&self) -> Result<Script, ()> {
273+
fn get_destination_script(&self) -> Result<ScriptBuf, ()> {
274274
let secp_ctx = Secp256k1::signing_only();
275275
let channel_monitor_claim_key = SecretKey::from_slice(&[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, self.node_secret[31]]).unwrap();
276276
let our_channel_monitor_claim_key_hash = WPubkeyHash::hash(&PublicKey::from_secret_key(&secp_ctx, &channel_monitor_claim_key).serialize());

fuzz/src/full_stack.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
use bitcoin::blockdata::constants::genesis_block;
1717
use bitcoin::blockdata::transaction::{Transaction, TxOut};
18-
use bitcoin::blockdata::script::{Builder, Script};
18+
use bitcoin::blockdata::script::{Builder, ScriptBuf};
1919
use bitcoin::blockdata::opcodes;
2020
use bitcoin::blockdata::locktime::absolute::LockTime;
2121
use bitcoin::consensus::encode::deserialize;
@@ -391,7 +391,7 @@ impl SignerProvider for KeyProvider {
391391
))
392392
}
393393

394-
fn get_destination_script(&self) -> Result<Script, ()> {
394+
fn get_destination_script(&self) -> Result<ScriptBuf, ()> {
395395
let secp_ctx = Secp256k1::signing_only();
396396
let channel_monitor_claim_key = SecretKey::from_slice(&hex::decode("0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap()[..]).unwrap();
397397
let our_channel_monitor_claim_key_hash = WPubkeyHash::hash(&PublicKey::from_secret_key(&secp_ctx, &channel_monitor_claim_key).serialize());
@@ -481,7 +481,7 @@ pub fn do_test(data: &[u8], logger: &Arc<dyn Logger>) {
481481
let mut should_forward = false;
482482
let mut payments_received: Vec<PaymentHash> = Vec::new();
483483
let mut payments_sent = 0;
484-
let mut pending_funding_generation: Vec<(ChannelId, PublicKey, u64, Script)> = Vec::new();
484+
let mut pending_funding_generation: Vec<(ChannelId, PublicKey, u64, ScriptBuf)> = Vec::new();
485485
let mut pending_funding_signatures = HashMap::new();
486486

487487
loop {

fuzz/src/onion_message.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Imports that need to be added manually
22
use bitcoin::bech32::u5;
3-
use bitcoin::blockdata::script::Script;
3+
use bitcoin::blockdata::script::ScriptBuf;
44
use bitcoin::secp256k1::{PublicKey, Scalar, Secp256k1, SecretKey};
55
use bitcoin::secp256k1::ecdh::SharedSecret;
66
use bitcoin::secp256k1::ecdsa::RecoverableSignature;
@@ -199,7 +199,7 @@ impl SignerProvider for KeyProvider {
199199

200200
fn read_chan_signer(&self, _data: &[u8]) -> Result<TestChannelSigner, DecodeError> { unreachable!() }
201201

202-
fn get_destination_script(&self) -> Result<Script, ()> { unreachable!() }
202+
fn get_destination_script(&self) -> Result<ScriptBuf, ()> { unreachable!() }
203203

204204
fn get_shutdown_scriptpubkey(&self) -> Result<ShutdownScript, ()> { unreachable!() }
205205
}

lightning-invoice/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ impl<'de> Deserialize<'de> for Bolt11Invoice {
17551755

17561756
#[cfg(test)]
17571757
mod test {
1758-
use bitcoin::Script;
1758+
use bitcoin::ScriptBuf;
17591759
use bitcoin_hashes::hex::FromHex;
17601760
use bitcoin_hashes::sha256;
17611761

@@ -1875,7 +1875,7 @@ mod test {
18751875
use lightning::ln::features::Bolt11InvoiceFeatures;
18761876
use secp256k1::Secp256k1;
18771877
use secp256k1::SecretKey;
1878-
use crate::{Bolt11Invoice, RawBolt11Invoice, RawHrp, RawDataPart, Currency, Sha256, PositiveTimestamp,
1878+
use crate::{Bolt11Invoice, RawBolt11Invoice, RawHrp, RawDataPart, Currency, Sha256, PositiveTimestamp,
18791879
Bolt11SemanticError};
18801880

18811881
let private_key = SecretKey::from_slice(&[42; 32]).unwrap();
@@ -2146,7 +2146,7 @@ mod test {
21462146
assert_eq!(invoice.expiry_time(), Duration::from_secs(54321));
21472147
assert_eq!(invoice.min_final_cltv_expiry_delta(), 144);
21482148
assert_eq!(invoice.fallbacks(), vec![&Fallback::PubKeyHash(PubkeyHash::from_slice(&[0;20]).unwrap())]);
2149-
let address = Address::from_script(&Script::new_p2pkh(&PubkeyHash::from_slice(&[0;20]).unwrap()), Network::Testnet).unwrap();
2149+
let address = Address::from_script(&ScriptBuf::new_p2pkh(&PubkeyHash::from_slice(&[0;20]).unwrap()), Network::Testnet).unwrap();
21502150
assert_eq!(invoice.fallback_addresses(), vec![address]);
21512151
assert_eq!(invoice.private_routes(), vec![&PrivateRoute(route_1), &PrivateRoute(route_2)]);
21522152
assert_eq!(

lightning-transaction-sync/src/esplora.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use lightning::{log_error, log_info, log_debug, log_trace};
66
use lightning::chain::WatchedOutput;
77
use lightning::chain::{Confirm, Filter};
88

9-
use bitcoin::{BlockHash, Script, Txid};
9+
use bitcoin::{BlockHash, Script, ScriptBuf, Txid};
1010

1111
use esplora_client::Builder;
1212
#[cfg(feature = "async-interface")]

lightning/src/chain/channelmonitor.rs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
2323
use bitcoin::blockdata::block::Header;
2424
use bitcoin::blockdata::transaction::{OutPoint as BitcoinOutPoint, TxOut, Transaction};
25-
use bitcoin::blockdata::script::Script;
25+
use bitcoin::blockdata::script::{Script, ScriptBuf};
2626

2727
use bitcoin::hashes::Hash;
2828
use bitcoin::hashes::sha256::Hash as Sha256;
@@ -517,7 +517,7 @@ pub(crate) enum ChannelMonitorUpdateStep {
517517
should_broadcast: bool,
518518
},
519519
ShutdownScript {
520-
scriptpubkey: Script,
520+
scriptpubkey: ScriptBuf,
521521
},
522522
}
523523

@@ -751,19 +751,19 @@ pub(crate) struct ChannelMonitorImpl<Signer: WriteableEcdsaChannelSigner> {
751751
latest_update_id: u64,
752752
commitment_transaction_number_obscure_factor: u64,
753753

754-
destination_script: Script,
755-
broadcasted_holder_revokable_script: Option<(Script, PublicKey, PublicKey)>,
756-
counterparty_payment_script: Script,
757-
shutdown_script: Option<Script>,
754+
destination_script: ScriptBuf,
755+
broadcasted_holder_revokable_script: Option<(ScriptBuf, PublicKey, PublicKey)>,
756+
counterparty_payment_script: ScriptBuf,
757+
shutdown_script: Option<ScriptBuf>,
758758

759759
channel_keys_id: [u8; 32],
760760
holder_revocation_basepoint: PublicKey,
761-
funding_info: (OutPoint, Script),
761+
funding_info: (OutPoint, ScriptBuf),
762762
current_counterparty_commitment_txid: Option<Txid>,
763763
prev_counterparty_commitment_txid: Option<Txid>,
764764

765765
counterparty_commitment_params: CounterpartyCommitmentParameters,
766-
funding_redeemscript: Script,
766+
funding_redeemscript: ScriptBuf,
767767
channel_value_satoshis: u64,
768768
// first is the idx of the first of the two per-commitment points
769769
their_cur_per_commitment_points: Option<(u64, PublicKey, Option<PublicKey>)>,
@@ -832,7 +832,7 @@ pub(crate) struct ChannelMonitorImpl<Signer: WriteableEcdsaChannelSigner> {
832832
// interface knows about the TXOs that we want to be notified of spends of. We could probably
833833
// be smart and derive them from the above storage fields, but its much simpler and more
834834
// Obviously Correct (tm) if we just keep track of them explicitly.
835-
outputs_to_watch: HashMap<Txid, Vec<(u32, Script)>>,
835+
outputs_to_watch: HashMap<Txid, Vec<(u32, ScriptBuf)>>,
836836

837837
#[cfg(test)]
838838
pub onchain_tx_handler: OnchainTxHandler<Signer>,
@@ -941,7 +941,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Writeable for ChannelMonitorImpl<Signe
941941
self.counterparty_payment_script.write(writer)?;
942942
match &self.shutdown_script {
943943
Some(script) => script.write(writer)?,
944-
None => Script::new().write(writer)?,
944+
None => ScriptBuf::new().write(writer)?,
945945
}
946946

947947
self.channel_keys_id.write(writer)?;
@@ -1133,10 +1133,10 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
11331133
ChannelMonitor { inner: Mutex::new(imp) }
11341134
}
11351135

1136-
pub(crate) fn new(secp_ctx: Secp256k1<secp256k1::All>, keys: Signer, shutdown_script: Option<Script>,
1137-
on_counterparty_tx_csv: u16, destination_script: &Script, funding_info: (OutPoint, Script),
1136+
pub(crate) fn new(secp_ctx: Secp256k1<secp256k1::All>, keys: Signer, shutdown_script: Option<ScriptBuf>,
1137+
on_counterparty_tx_csv: u16, destination_script: &Script, funding_info: (OutPoint, ScriptBuf),
11381138
channel_parameters: &ChannelTransactionParameters,
1139-
funding_redeemscript: Script, channel_value_satoshis: u64,
1139+
funding_redeemscript: ScriptBuf, channel_value_satoshis: u64,
11401140
commitment_transaction_number_obscure_factor: u64,
11411141
initial_holder_commitment_tx: HolderCommitmentTransaction,
11421142
best_block: BestBlock, counterparty_node_id: PublicKey) -> ChannelMonitor<Signer> {
@@ -1175,7 +1175,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
11751175
};
11761176

11771177
let onchain_tx_handler = OnchainTxHandler::new(
1178-
channel_value_satoshis, channel_keys_id, destination_script.clone(), keys,
1178+
channel_value_satoshis, channel_keys_id, destination_script.into(), keys,
11791179
channel_parameters.clone(), initial_holder_commitment_tx, secp_ctx
11801180
);
11811181

@@ -1186,7 +1186,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
11861186
latest_update_id: 0,
11871187
commitment_transaction_number_obscure_factor,
11881188

1189-
destination_script: destination_script.clone(),
1189+
destination_script: destination_script.into(),
11901190
broadcasted_holder_revokable_script: None,
11911191
counterparty_payment_script,
11921192
shutdown_script,
@@ -1332,13 +1332,13 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
13321332
}
13331333

13341334
/// Gets the funding transaction outpoint of the channel this ChannelMonitor is monitoring for.
1335-
pub fn get_funding_txo(&self) -> (OutPoint, Script) {
1335+
pub fn get_funding_txo(&self) -> (OutPoint, ScriptBuf) {
13361336
self.inner.lock().unwrap().get_funding_txo().clone()
13371337
}
13381338

13391339
/// Gets a list of txids, with their output scripts (in the order they appear in the
13401340
/// transaction), which we must learn about spends of via block_connected().
1341-
pub fn get_outputs_to_watch(&self) -> Vec<(Txid, Vec<(u32, Script)>)> {
1341+
pub fn get_outputs_to_watch(&self) -> Vec<(Txid, Vec<(u32, ScriptBuf)>)> {
13421342
self.inner.lock().unwrap().get_outputs_to_watch()
13431343
.iter().map(|(txid, outputs)| (*txid, outputs.clone())).collect()
13441344
}
@@ -1707,12 +1707,12 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
17071707
}
17081708

17091709
#[cfg(test)]
1710-
pub fn get_counterparty_payment_script(&self) -> Script{
1710+
pub fn get_counterparty_payment_script(&self) -> ScriptBuf {
17111711
self.inner.lock().unwrap().counterparty_payment_script.clone()
17121712
}
17131713

17141714
#[cfg(test)]
1715-
pub fn set_counterparty_payment_script(&self, script: Script) {
1715+
pub fn set_counterparty_payment_script(&self, script: ScriptBuf) {
17161716
self.inner.lock().unwrap().counterparty_payment_script = script;
17171717
}
17181718
}
@@ -2767,11 +2767,11 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
27672767
self.latest_update_id
27682768
}
27692769

2770-
pub fn get_funding_txo(&self) -> &(OutPoint, Script) {
2770+
pub fn get_funding_txo(&self) -> &(OutPoint, ScriptBuf) {
27712771
&self.funding_info
27722772
}
27732773

2774-
pub fn get_outputs_to_watch(&self) -> &HashMap<Txid, Vec<(u32, Script)>> {
2774+
pub fn get_outputs_to_watch(&self) -> &HashMap<Txid, Vec<(u32, ScriptBuf)>> {
27752775
// If we've detected a counterparty commitment tx on chain, we must include it in the set
27762776
// of outputs to watch for spends of, otherwise we're likely to lose user funds. Because
27772777
// its trivial to do, double-check that here.
@@ -3204,7 +3204,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
32043204
// Returns (1) `PackageTemplate`s that can be given to the OnchainTxHandler, so that the handler can
32053205
// broadcast transactions claiming holder HTLC commitment outputs and (2) a holder revokable
32063206
// script so we can detect whether a holder transaction has been seen on-chain.
3207-
fn get_broadcasted_holder_claims(&self, holder_tx: &HolderSignedTx, conf_height: u32) -> (Vec<PackageTemplate>, Option<(Script, PublicKey, PublicKey)>) {
3207+
fn get_broadcasted_holder_claims(&self, holder_tx: &HolderSignedTx, conf_height: u32) -> (Vec<PackageTemplate>, Option<(ScriptBuf, PublicKey, PublicKey)>) {
32083208
let mut claim_requests = Vec::with_capacity(holder_tx.htlc_outputs.len());
32093209

32103210
let redeemscript = chan_utils::get_revokeable_redeemscript(&holder_tx.revocation_key, self.on_holder_tx_csv, &holder_tx.delayed_payment_key);
@@ -3792,7 +3792,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
37923792
return true;
37933793
}
37943794

3795-
assert_eq!(&bitcoin::Address::p2wsh(&Script::from(input.witness.last().unwrap().to_vec()), bitcoin::Network::Bitcoin).script_pubkey(), _script_pubkey);
3795+
assert_eq!(&bitcoin::Address::p2wsh(&ScriptBuf::from(input.witness.last().unwrap().to_vec()), bitcoin::Network::Bitcoin).script_pubkey(), _script_pubkey);
37963796
} else if _script_pubkey.is_v0_p2wpkh() {
37973797
assert_eq!(&bitcoin::Address::p2wpkh(&bitcoin::PublicKey::from_slice(&input.witness.last().unwrap()).unwrap(), bitcoin::Network::Bitcoin).unwrap().script_pubkey(), _script_pubkey);
37983798
} else { panic!(); }
@@ -4208,9 +4208,9 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
42084208
1 => { None },
42094209
_ => return Err(DecodeError::InvalidValue),
42104210
};
4211-
let mut counterparty_payment_script: Script = Readable::read(reader)?;
4211+
let mut counterparty_payment_script: ScriptBuf = Readable::read(reader)?;
42124212
let shutdown_script = {
4213-
let script = <Script as Readable>::read(reader)?;
4213+
let script = <ScriptBuf as Readable>::read(reader)?;
42144214
if script.is_empty() { None } else { Some(script) }
42154215
};
42164216

@@ -4353,11 +4353,11 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
43534353
}
43544354

43554355
let outputs_to_watch_len: u64 = Readable::read(reader)?;
4356-
let mut outputs_to_watch = HashMap::with_capacity(cmp::min(outputs_to_watch_len as usize, MAX_ALLOC_SIZE / (mem::size_of::<Txid>() + mem::size_of::<u32>() + mem::size_of::<Vec<Script>>())));
4356+
let mut outputs_to_watch = HashMap::with_capacity(cmp::min(outputs_to_watch_len as usize, MAX_ALLOC_SIZE / (mem::size_of::<Txid>() + mem::size_of::<u32>() + mem::size_of::<Vec<ScriptBuf>>())));
43574357
for _ in 0..outputs_to_watch_len {
43584358
let txid = Readable::read(reader)?;
43594359
let outputs_len: u64 = Readable::read(reader)?;
4360-
let mut outputs = Vec::with_capacity(cmp::min(outputs_len as usize, MAX_ALLOC_SIZE / (mem::size_of::<u32>() + mem::size_of::<Script>())));
4360+
let mut outputs = Vec::with_capacity(cmp::min(outputs_len as usize, MAX_ALLOC_SIZE / (mem::size_of::<u32>() + mem::size_of::<ScriptBuf>())));
43614361
for _ in 0..outputs_len {
43624362
outputs.push((Readable::read(reader)?, Readable::read(reader)?));
43634363
}
@@ -4481,7 +4481,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
44814481
#[cfg(test)]
44824482
mod tests {
44834483
use bitcoin::blockdata::locktime::absolute::LockTime;
4484-
use bitcoin::blockdata::script::{Script, Builder};
4484+
use bitcoin::blockdata::script::{ScriptBuf, Builder};
44854485
use bitcoin::blockdata::opcodes;
44864486
use bitcoin::blockdata::transaction::{Transaction, TxIn, TxOut};
44874487
use bitcoin::blockdata::transaction::OutPoint as BitcoinOutPoint;
@@ -4696,9 +4696,9 @@ mod tests {
46964696
let shutdown_pubkey = PublicKey::from_secret_key(&secp_ctx, &SecretKey::from_slice(&[42; 32]).unwrap());
46974697
let best_block = BestBlock::from_network(Network::Testnet);
46984698
let monitor = ChannelMonitor::new(Secp256k1::new(), keys,
4699-
Some(ShutdownScript::new_p2wpkh_from_pubkey(shutdown_pubkey).into_inner()), 0, &Script::new(),
4700-
(OutPoint { txid: Txid::from_slice(&[43; 32]).unwrap(), index: 0 }, Script::new()),
4701-
&channel_parameters, Script::new(), 46, 0, HolderCommitmentTransaction::dummy(&mut Vec::new()),
4699+
Some(ShutdownScript::new_p2wpkh_from_pubkey(shutdown_pubkey).into_inner()), 0, &ScriptBuf::new(),
4700+
(OutPoint { txid: Txid::from_slice(&[43; 32]).unwrap(), index: 0 }, ScriptBuf::new()),
4701+
&channel_parameters, ScriptBuf::new(), 46, 0, HolderCommitmentTransaction::dummy(&mut Vec::new()),
47024702
best_block, dummy_key);
47034703

47044704
let mut htlcs = preimages_slice_to_htlcs!(preimages[0..10]);
@@ -4814,7 +4814,7 @@ mod tests {
48144814
txid,
48154815
vout: i,
48164816
},
4817-
script_sig: Script::new(),
4817+
script_sig: ScriptBuf::new(),
48184818
sequence: Sequence::ENABLE_RBF_NO_LOCKTIME,
48194819
witness: Witness::new(),
48204820
});
@@ -4846,7 +4846,7 @@ mod tests {
48464846
txid,
48474847
vout: i,
48484848
},
4849-
script_sig: Script::new(),
4849+
script_sig: ScriptBuf::new(),
48504850
sequence: Sequence::ENABLE_RBF_NO_LOCKTIME,
48514851
witness: Witness::new(),
48524852
});
@@ -4877,7 +4877,7 @@ mod tests {
48774877
txid,
48784878
vout: 0,
48794879
},
4880-
script_sig: Script::new(),
4880+
script_sig: ScriptBuf::new(),
48814881
sequence: Sequence::ENABLE_RBF_NO_LOCKTIME,
48824882
witness: Witness::new(),
48834883
});

lightning/src/chain/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
use bitcoin::blockdata::block::{Block, Header};
1313
use bitcoin::blockdata::constants::genesis_block;
14-
use bitcoin::blockdata::script::Script;
14+
use bitcoin::blockdata::script::{Script, ScriptBuf};
1515
use bitcoin::hash_types::{BlockHash, Txid};
1616
use bitcoin::network::constants::Network;
1717
use bitcoin::secp256k1::PublicKey;
@@ -354,7 +354,7 @@ pub struct WatchedOutput {
354354
pub outpoint: OutPoint,
355355

356356
/// Spending condition of the transaction output.
357-
pub script_pubkey: Script,
357+
pub script_pubkey: ScriptBuf,
358358
}
359359

360360
impl<T: Listen> Listen for core::ops::Deref<Target = T> {

lightning/src/chain/onchaintx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use bitcoin::blockdata::locktime::absolute::LockTime;
1616
use bitcoin::blockdata::transaction::Transaction;
1717
use bitcoin::blockdata::transaction::OutPoint as BitcoinOutPoint;
18-
use bitcoin::blockdata::script::Script;
18+
use bitcoin::blockdata::script::{Script, ScriptBuf};
1919
use bitcoin::hashes::{Hash, HashEngine};
2020
use bitcoin::hashes::sha256::Hash as Sha256;
2121
use bitcoin::hash_types::{Txid, BlockHash};
@@ -216,7 +216,7 @@ pub(crate) enum OnchainClaim {
216216
pub struct OnchainTxHandler<ChannelSigner: WriteableEcdsaChannelSigner> {
217217
channel_value_satoshis: u64,
218218
channel_keys_id: [u8; 32],
219-
destination_script: Script,
219+
destination_script: ScriptBuf,
220220
holder_commitment: HolderCommitmentTransaction,
221221
prev_holder_commitment: Option<HolderCommitmentTransaction>,
222222

@@ -433,7 +433,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
433433

434434
impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner> {
435435
pub(crate) fn new(
436-
channel_value_satoshis: u64, channel_keys_id: [u8; 32], destination_script: Script,
436+
channel_value_satoshis: u64, channel_keys_id: [u8; 32], destination_script: ScriptBuf,
437437
signer: ChannelSigner, channel_parameters: ChannelTransactionParameters,
438438
holder_commitment: HolderCommitmentTransaction, secp_ctx: Secp256k1<secp256k1::All>
439439
) -> Self {

0 commit comments

Comments
 (0)