Skip to content

Commit

Permalink
Merge #585: 1.1 backports
Browse files Browse the repository at this point in the history
81a40b8 daemon: bump version to 1.1 (Antoine Poinsot)
c87ab80 ci: work around rustc 1.71 bug (Antoine Poinsot)
5fa5ccd Update proc-macro2 to fix a nightly compilation bug (Antoine Poinsot)
aab880f bitcoind: create watchonly wallet with load_on_startup = true (Antoine Poinsot)
8c4536b gui: update async-hwi 0.0.7 (edouard)

Pull request description:

  Some bug fixes for 1.0 to be released before 2.0 is out.

  The first commit is from #551 to fix a connection bug to the Specter DIY.

ACKs for top commit:
  darosior:
    self-ACK 81a40b8

Tree-SHA512: 74205b0f3a8ccb6803d71de50cde9fdc02792d67c77196a5ee76f6f01cad3fc393820b19051ab6bc3e9e837bc194461d12159d5c5f5e18ee09a3d364456b2c2f
  • Loading branch information
darosior committed Jul 31, 2023
2 parents 68c8f65 + 81a40b8 commit 9c23d01
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
task:
name: 'Functional tests'
container:
image: rust:1-bookworm
image: rust:1.70-bookworm
timeout_in: 90m # https://cirrus-ci.org/faq/#instance-timed-out

env:
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Liana daemon and GUI release notes

## 1.1

This is a tiny patch release for 1.0.

### Features

N/A

### Fixes

- Set `load_on_startup = true` when creating a watchonly wallet on `bitcoind`.

#### GUI-specific

- Fix an intermittent connection bug to the Specter DIY.


## 1.0

This is the first non-beta release of Liana.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "liana"
version = "1.0.0"
version = "1.1.0"
authors = ["Antoine Poinsot <[email protected]>"]
edition = "2018"
repository = "https://github.com/wizardsardine/liana"
Expand Down
10 changes: 5 additions & 5 deletions gui/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name = "liana-gui"
path = "src/main.rs"

[dependencies]
async-hwi = "0.0.6"
async-hwi = "0.0.7"
liana = { git = "https://github.com/wizardsardine/liana", branch = "1.0", default-features = false }
liana_ui = { path = "ui" }
backtrace = "0.3"
Expand Down
41 changes: 21 additions & 20 deletions gui/src/hw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use liana::miniscript::bitcoin::{
util::bip32::Fingerprint,
};
use serde::{Deserialize, Serialize};
use tracing::debug;
use tracing::{debug, warn};

#[derive(Debug, Clone)]
pub enum HardwareWallet {
Expand Down Expand Up @@ -102,18 +102,18 @@ pub async fn list_hardware_wallets(wallet: &Wallet) -> Vec<HardwareWallet> {
debug!("{}", e);
}
}
match specter::Specter::try_connect_serial().await {
Ok(device) => match HardwareWallet::new(Arc::new(device), Some(&wallet.keys_aliases)).await
{
Ok(hw) => hws.push(hw),
Err(e) => {
debug!("{}", e);
match specter::Specter::enumerate().await {
Ok(devices) => {
for device in devices {
match HardwareWallet::new(Arc::new(device), Some(&wallet.keys_aliases)).await {
Ok(hw) => hws.push(hw),
Err(e) => {
debug!("{}", e);
}
}
}
},
Err(HWIError::DeviceNotFound) => {}
Err(e) => {
debug!("{}", e);
}
Err(e) => warn!("Error while listing specter wallets: {}", e),
}
match ledger::LedgerSimulator::try_connect().await {
Ok(mut device) => match device.get_master_fingerprint().await {
Expand Down Expand Up @@ -249,17 +249,18 @@ pub async fn list_unregistered_hardware_wallets(
debug!("{}", e);
}
}
match specter::Specter::try_connect_serial().await {
Ok(device) => match HardwareWallet::new(Arc::new(device), aliases).await {
Ok(hw) => hws.push(hw),
Err(e) => {
debug!("{}", e);
match specter::Specter::enumerate().await {
Ok(devices) => {
for device in devices {
match HardwareWallet::new(Arc::new(device), aliases).await {
Ok(hw) => hws.push(hw),
Err(e) => {
debug!("{}", e);
}
}
}
},
Err(HWIError::DeviceNotFound) => {}
Err(e) => {
debug!("{}", e);
}
Err(e) => warn!("Error while listing specter wallets: {}", e),
}
match ledger::LedgerSimulator::try_connect().await {
Ok(device) => match device.get_master_fingerprint().await {
Expand Down
10 changes: 8 additions & 2 deletions src/bitcoin/d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,19 @@ impl BitcoinD {
}

fn create_wallet(&self, wallet_path: String) -> Result<(), String> {
// NOTE: we set load_on_startup to make sure the wallet will get updated before the
// historical blocks are deleted in case the bitcoind is pruned.
let res = self
.make_fallible_node_request(
"createwallet",
&params!(
Json::String(wallet_path),
Json::Bool(true), // watchonly
Json::Bool(true), // blank
Json::Bool(true), // watchonly
Json::Bool(true), // blank
Json::Null, // passphrase
Json::Bool(false), // avoid_reuse
Json::Bool(true), // descriptors
Json::Bool(true) // load_on_startup
),
)
.map_err(|e| e.to_string())?;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl fmt::Display for Version {

pub const VERSION: Version = Version {
major: 1,
minor: 0,
minor: 1,
patch: 0,
};

Expand Down
2 changes: 1 addition & 1 deletion tests/test_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

def test_getinfo(lianad):
res = lianad.rpc.getinfo()
assert res["version"] == "1.0.0"
assert res["version"] == "1.1.0"
assert res["network"] == "regtest"
wait_for(lambda: lianad.rpc.getinfo()["block_height"] == 101)
res = lianad.rpc.getinfo()
Expand Down

0 comments on commit 9c23d01

Please sign in to comment.