mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-03-15 15:39:09 +01:00
Fix lightning-background-processor 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.
This commit is contained in:
parent
d85a1a9a8d
commit
813202f554
1 changed files with 10 additions and 7 deletions
|
@ -1866,7 +1866,10 @@ mod tests {
|
|||
nodes[0]
|
||||
.node
|
||||
.force_close_broadcasting_latest_txn(
|
||||
&ChannelId::v1_from_funding_outpoint(OutPoint { txid: tx.txid(), index: 0 }),
|
||||
&ChannelId::v1_from_funding_outpoint(OutPoint {
|
||||
txid: tx.compute_txid(),
|
||||
index: 0,
|
||||
}),
|
||||
&nodes[1].node.get_our_node_id(),
|
||||
error_message.to_string(),
|
||||
)
|
||||
|
@ -2134,7 +2137,7 @@ mod tests {
|
|||
get_event_msg!(nodes[1], MessageSendEvent::SendChannelUpdate, node_0_id);
|
||||
let broadcast_funding =
|
||||
nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().pop().unwrap();
|
||||
assert_eq!(broadcast_funding.txid(), funding_tx.txid());
|
||||
assert_eq!(broadcast_funding.compute_txid(), funding_tx.compute_txid());
|
||||
assert!(nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().is_empty());
|
||||
|
||||
if !std::thread::panicking() {
|
||||
|
@ -2212,7 +2215,7 @@ mod tests {
|
|||
let sweep_tx_0 = nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().pop().unwrap();
|
||||
match tracked_output.status {
|
||||
OutputSpendStatus::PendingFirstConfirmation { latest_spending_tx, .. } => {
|
||||
assert_eq!(sweep_tx_0.txid(), latest_spending_tx.txid());
|
||||
assert_eq!(sweep_tx_0.compute_txid(), latest_spending_tx.compute_txid());
|
||||
},
|
||||
_ => panic!("Unexpected status"),
|
||||
}
|
||||
|
@ -2224,7 +2227,7 @@ mod tests {
|
|||
let sweep_tx_1 = nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().pop().unwrap();
|
||||
match tracked_output.status {
|
||||
OutputSpendStatus::PendingFirstConfirmation { latest_spending_tx, .. } => {
|
||||
assert_eq!(sweep_tx_1.txid(), latest_spending_tx.txid());
|
||||
assert_eq!(sweep_tx_1.compute_txid(), latest_spending_tx.compute_txid());
|
||||
},
|
||||
_ => panic!("Unexpected status"),
|
||||
}
|
||||
|
@ -2236,7 +2239,7 @@ mod tests {
|
|||
let sweep_tx_2 = nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().pop().unwrap();
|
||||
match tracked_output.status {
|
||||
OutputSpendStatus::PendingFirstConfirmation { latest_spending_tx, .. } => {
|
||||
assert_eq!(sweep_tx_2.txid(), latest_spending_tx.txid());
|
||||
assert_eq!(sweep_tx_2.compute_txid(), latest_spending_tx.compute_txid());
|
||||
},
|
||||
_ => panic!("Unexpected status"),
|
||||
}
|
||||
|
@ -2249,7 +2252,7 @@ mod tests {
|
|||
let tracked_output = nodes[0].sweeper.tracked_spendable_outputs().first().unwrap().clone();
|
||||
match tracked_output.status {
|
||||
OutputSpendStatus::PendingThresholdConfirmations { latest_spending_tx, .. } => {
|
||||
assert_eq!(sweep_tx_2.txid(), latest_spending_tx.txid());
|
||||
assert_eq!(sweep_tx_2.compute_txid(), latest_spending_tx.compute_txid());
|
||||
},
|
||||
_ => panic!("Unexpected status"),
|
||||
}
|
||||
|
@ -2264,7 +2267,7 @@ mod tests {
|
|||
let tracked_output = nodes[0].sweeper.tracked_spendable_outputs().first().unwrap().clone();
|
||||
match tracked_output.status {
|
||||
OutputSpendStatus::PendingThresholdConfirmations { latest_spending_tx, .. } => {
|
||||
assert_eq!(sweep_tx_2.txid(), latest_spending_tx.txid());
|
||||
assert_eq!(sweep_tx_2.compute_txid(), latest_spending_tx.compute_txid());
|
||||
},
|
||||
_ => panic!("Unexpected status"),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue