Skip to content

Commit b72b5e9

Browse files
committed
Fix fuzz warnings.
Version 0.32.2 of `rust-bitcoin` deprecates a number of methods that are commonly used in this project, most visibly `txid()`, which is now called `compute_txid()`. This resulted in a lot of warnings, and this commit is part of a series that seeks to address that.
1 parent 19c0caf commit b72b5e9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

fuzz/src/chanmon_consistency.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out, anchors: bool) {
880880
script_pubkey: output_script,
881881
}],
882882
};
883-
funding_output = OutPoint { txid: tx.txid(), index: 0 };
883+
funding_output = OutPoint { txid: tx.compute_txid(), index: 0 };
884884
$source
885885
.funding_transaction_generated(
886886
temporary_channel_id,

fuzz/src/full_stack.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl<'a> MoneyLossDetector<'a> {
306306
fn connect_block(&mut self, all_txn: &[Transaction]) {
307307
let mut txdata = Vec::with_capacity(all_txn.len());
308308
for (idx, tx) in all_txn.iter().enumerate() {
309-
let txid = tx.txid();
309+
let txid = tx.compute_txid();
310310
self.txids_confirmed.entry(txid).or_insert_with(|| {
311311
txdata.push((idx + 1, tx));
312312
self.height
@@ -898,7 +898,7 @@ pub fn do_test(mut data: &[u8], logger: &Arc<dyn Logger>) {
898898
if tx.version.0 > 0xff {
899899
break;
900900
}
901-
let funding_txid = tx.txid();
901+
let funding_txid = tx.compute_txid();
902902
if loss_detector.txids_confirmed.get(&funding_txid).is_none() {
903903
let outpoint = OutPoint { txid: funding_txid, index: 0 };
904904
for chan in channelmanager.list_channels() {
@@ -923,7 +923,7 @@ pub fn do_test(mut data: &[u8], logger: &Arc<dyn Logger>) {
923923
panic!();
924924
}
925925
}
926-
let funding_txid = tx.txid();
926+
let funding_txid = tx.compute_txid();
927927
for idx in 0..tx.output.len() {
928928
let outpoint = OutPoint { txid: funding_txid, index: idx as u16 };
929929
pending_funding_signatures.insert(outpoint, tx.clone());

0 commit comments

Comments
 (0)