mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-16 09:03:54 -05:00
Update dependencies and rust-toolchain to 1.59
This commit updates the rust-toolchain to the current stable version
1.59, and fixes a number of new clippy warnings from that change.
Other changes:
- updates backoff to 0.4
- updates swap to 2021 edition
- updates comfy-table to 5.0
- updates monero-wallet to 2021 edition
- updates moneor-harness to 2021 edition
- updates bdk and rust_decimal
- updates tokio-util to 0.7
- updates workflow to use actions/setup-python@3
- updates pem and serde_with
- adds stable rust toolchain notice to readme
This commit is contained in:
parent
c76abd48c7
commit
5a3675a06f
27 changed files with 265 additions and 186 deletions
|
|
@ -200,9 +200,10 @@ mod tests {
|
|||
#[tokio::test]
|
||||
async fn bob_can_fund_without_a_change_output() {
|
||||
let (A, B) = alice_and_bob();
|
||||
let fees = 610;
|
||||
let fees = 300;
|
||||
let agreed_amount = Amount::from_sat(10000);
|
||||
let wallet = WalletBuilder::new(agreed_amount.as_sat() + fees).build();
|
||||
let amount = agreed_amount.as_sat() + fees;
|
||||
let wallet = WalletBuilder::new(amount).build();
|
||||
|
||||
let psbt = bob_make_psbt(A, B, &wallet, agreed_amount).await;
|
||||
assert_eq!(
|
||||
|
|
@ -262,7 +263,7 @@ mod tests {
|
|||
amount: Amount,
|
||||
) -> PartiallySignedTransaction {
|
||||
let change = wallet.new_address().await.unwrap();
|
||||
TxLock::new(&wallet, amount, A, B, change)
|
||||
TxLock::new(wallet, amount, A, B, change)
|
||||
.await
|
||||
.unwrap()
|
||||
.into()
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ impl TxRedeem {
|
|||
|
||||
let sig = sigs
|
||||
.into_iter()
|
||||
.find(|sig| verify_sig(&B, &self.digest(), &sig).is_ok())
|
||||
.find(|sig| verify_sig(&B, &self.digest(), sig).is_ok())
|
||||
.context("Neither signature on witness stack verifies against B")?;
|
||||
|
||||
Ok(sig)
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ impl TxRefund {
|
|||
|
||||
let sig = sigs
|
||||
.into_iter()
|
||||
.find(|sig| verify_sig(&B, &self.digest(), &sig).is_ok())
|
||||
.find(|sig| verify_sig(&B, &self.digest(), sig).is_ok())
|
||||
.context("Neither signature on witness stack verifies against B")?;
|
||||
|
||||
Ok(sig)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ impl Wallet {
|
|||
self.wallet
|
||||
.lock()
|
||||
.await
|
||||
.broadcast(transaction)
|
||||
.broadcast(&transaction)
|
||||
.with_context(|| {
|
||||
format!("Failed to broadcast Bitcoin {} transaction {}", kind, txid)
|
||||
})?;
|
||||
|
|
@ -152,13 +152,13 @@ impl Wallet {
|
|||
ScriptStatus::Retrying
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if new_status != ScriptStatus::Retrying
|
||||
{
|
||||
last_status = Some(print_status_change(txid, last_status, new_status));
|
||||
|
||||
let all_receivers_gone = sender.send(new_status).is_err();
|
||||
|
||||
|
||||
if all_receivers_gone {
|
||||
tracing::debug!(%txid, "All receivers gone, removing subscription");
|
||||
client.lock().await.subscriptions.remove(&(txid, script));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue