Skip to content

Commit

Permalink
Minor texts/formatting/logging updates
Browse files Browse the repository at this point in the history
  • Loading branch information
shesek committed Jan 14, 2021
1 parent 21d40c0 commit e561209
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: rust
rust: [ stable ]
cache: { cargo: true }
env: [ CARGO_TERM_COLOR=always ]

jobs:
include:
Expand Down Expand Up @@ -53,7 +54,7 @@ jobs:
- >
rm -rf dist/*/ &&
echo '-----BEGIN SHA256SUM-----' &&
(cd dist && sha256sum *) &&
(cd dist && sha256sum * | sort) &&
echo
# XXX if: branch in (master, dev, latest) OR tag IS present

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

- Support for tracking standalone addresses (#14)

Using `--address <address>` or `--address-file <path>`.

- New config options: `force_rescan` (9e7ccbe), `setup_logger` (35fc49f) and `require_addresses` (162790d)

- Gracefully wait for bitcoind to warm-up (dec6d46)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ You can set multiple `--xpub`s to track. This also supports ypubs and zpubs.

You can also track output script descriptors using `--descriptor`. For example, `--descriptor 'wpkh(<xpub>/0/*)'`.

Standalone addresses can be tracked with `--address <address>` or `--addresses-file <path>`.

To speed up rescanning for historical transactions, you can provide the wallet creation date with `--rescan-since <timestmap>`.
The timestamp can be a `YYYY-MM-DD` formatted string, or 'now' to disable rescanning and watch for new
transactions only (for newly created wallets).
Expand Down Expand Up @@ -194,7 +196,8 @@ This removes several large dependencies and disables the `track-spends` database

You can use bwt with pruning, but:

1. You will have to provide a rescan date (via `--rescan-since`) that is within the range of non-pruned blocks, or use `none` to disable rescanning entirely.
1. You can only scan for transactions in the non-pruned history and will have to provide a rescan
date that is within the range of non-pruned blocks.

2. Electrum needs to be run with `--skipmerklecheck` to tolerate missing SPV proofs for transactions in pruned blocks.

Expand Down
2 changes: 1 addition & 1 deletion scripts/release-footer.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

------------

Also see the vVERSION downloads for [bwt-electrum-plugin](https://github.com/bwt-dev/bwt-electrum-plugin/releases/tag/vVERSION), [libbwt](https://github.com/bwt-dev/libbwt/releases/tag/vVERSION), [libbwt-nodejs](https://github.com/bwt-dev/libbwt-nodejs/releases/tag/vVERSION) and [libbwt-jni](https://github.com/bwt-dev/libbwt-jni/releases/tag/vVERSION).
Also see the vVERSION releases for [bwt-electrum-plugin](https://github.com/bwt-dev/bwt-electrum-plugin/releases/tag/vVERSION), [libbwt](https://github.com/bwt-dev/libbwt/releases/tag/vVERSION), [libbwt-nodejs](https://github.com/bwt-dev/libbwt-nodejs/releases/tag/vVERSION) and [libbwt-jni](https://github.com/bwt-dev/libbwt-jni/releases/tag/vVERSION).

### Installation

Expand Down
4 changes: 3 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ impl App {
}

let (sync_tx, sync_rx) = mpsc::channel();
// debounce sync message rate to avoid excessive indexing when bitcoind catches up

#[cfg(any(feature = "electrum", unix))]
// debounce external sync message rate to avoid excessive indexing when bitcoind catches up
let debounced_sync_tx = debounce_sender(sync_tx.clone(), DEBOUNCE_SEC);

#[cfg(feature = "electrum")]
Expand Down
2 changes: 1 addition & 1 deletion src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ impl HttpServer {
spawn(warp_server, addr, addr_tx, shutdown_rx);
});

let bound_addr = block_on_future(addr_rx).unwrap();
let bound_addr = block_on_future(addr_rx).expect("failed starting http server");
info!("HTTP REST API server running on http://{}/", bound_addr);

HttpServer {
Expand Down
2 changes: 1 addition & 1 deletion src/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ fn spawn_send_progress_thread(
return;
}
if let Err(e) = wait_wallet_scan(&rpc, progress_tx, Some(shutdown_rx), interval) {
debug!("progress thread aborted: {:?}", e);
trace!("progress thread aborted: {:?}", e);
}
});

Expand Down
22 changes: 7 additions & 15 deletions src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,7 @@ impl Wallet {
end_index: u32,
rescan: bool,
) -> Vec<(Address, RescanSince, String)> {
let rescan_since = if rescan {
self.rescan_since
} else {
RescanSince::Now
};
let rescan_since = iif!(rescan, self.rescan_since, RescanSince::Now);

(start_index..=end_index)
.map(|index| {
Expand Down Expand Up @@ -437,16 +433,12 @@ fn batch_import(rpc: &RpcClient, import_reqs: Vec<(Address, RescanSince, String)
let results = rpc.import_multi(
&import_reqs
.iter()
.map(|(address, rescan, label)| {
trace!("importing {} as {}", address, label,);

ImportMultiRequest {
label: Some(&label),
watchonly: Some(true),
timestamp: (*rescan).into(),
script_pubkey: Some(ImportMultiRequestScriptPubkey::Address(&address)),
..Default::default()
}
.map(|(address, rescan, label)| ImportMultiRequest {
label: Some(&label),
watchonly: Some(true),
timestamp: (*rescan).into(),
script_pubkey: Some(ImportMultiRequestScriptPubkey::Address(&address)),
..Default::default()
})
.collect::<Vec<_>>(),
None,
Expand Down

0 comments on commit e561209

Please sign in to comment.