Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1 backports #585

Merged
merged 5 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading