Skip to content

Commit a93c524

Browse files
committed
Minor renaming/rephrasing/fixups
1 parent d041afa commit a93c524

9 files changed

Lines changed: 14 additions & 12 deletions

File tree

contrib/libbwt.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
#define BWT_OK 0
77
#define BWT_ERR -1
88

9-
typedef void (*bwt_callback)(const char*, float, uint32_t, const char*);
9+
typedef void (*bwt_callback)(const char* msg_type, float progress,
10+
uint32_t detail_n, const char* detail_s);
1011

1112
int32_t bwt_start(const char* json_config,
1213
bwt_callback callback,

contrib/nodejs-bwt-daemon/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ let bwtd = await BwtDaemon({
6767
gap_limit: 100,
6868

6969
// Progress notifications for history scanning (a full rescan from genesis can take 20-30 minutes)
70-
progress_cb: (type, progress, detail) => console.log('bwt progress %s %f%%', type, progress*100, detail),
70+
progress: (type, progress, detail) => console.log('bwt %s progress %f%%', type, progress*100, detail),
7171
})
7272

7373
// Get the assigned address/port for the Electrum/HTTP servers

contrib/nodejs-bwt-daemon/example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const BwtDaemon = require('bwt-daemon')
1111
electrum: true,
1212
http: true,
1313
verbose: 2,
14-
progress_cb: (type, progress, detail) => console.log('bwt progress %s %f%%', type, progress*100, detail),
14+
progress: (type, progress, detail) => console.log('bwt progress %s %f%%', type, progress*100, detail),
1515
})
1616

1717
console.log('bwt running', bwtd.electrum_addr, bwtd.http_addr)

contrib/nodejs-bwt-daemon/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function start_bwt(options, progress_cb, done) {
2222
, progress_cb_ffi = ffi.Callback('void', [ 'string', 'float', 'uint32', 'string' ], progress_cb)
2323
, shutdown_ptrptr = ref.alloc(shutdownPtrPtr)
2424

25-
debug('starting');
25+
debug('starting with %O', options);
2626
libbwt.bwt_start.async(opt_json, progress_cb_ffi, shutdown_ptrptr, function(err, code) {
2727
if (err) return done(err)
2828
if (code != OK) return done(new Error(`bwt failed with code ${code}`))
@@ -35,9 +35,9 @@ function start_bwt(options, progress_cb, done) {
3535
function init(options) {
3636
return new Promise((resolve, reject) => {
3737
let opt_progress = null
38-
if (options.progress_cb) {
39-
opt_progress = options.progress_cb
40-
delete options.progress_cb
38+
if (options.progress) {
39+
opt_progress = options.progress
40+
delete options.progress
4141
}
4242

4343
// Convenience shortcuts

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ for platform in x86_64-linux x86_64-win x86_64-osx arm32v7 arm64v8; do
9898
done
9999

100100
# remove subdirectories, keep release tarballs
101-
rm -r dist/*/
101+
rm -rf dist/*/

scripts/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ changelog="`sed -nr '/^## (Unreleased|'$version' )/{n;:a;n;/^## /q;p;ba}' CHANGE
2929
grep '## Unreleased' CHANGELOG.md > /dev/null \
3030
&& sed -i "s/^## Unreleased/## $version - `date +%Y-%m-%d`/" CHANGELOG.md
3131

32-
sed -i -r "s~bwt-[0-9.]+-x86_64~bwt-$version-x86_64~g; s~/(download|tag)/v[0-9.]+~/\1/v$version~;" README.md
32+
sed -i -r "s~bwt-[0-9a-z.-]+-x86_64-linux\.~bwt-$version-x86_64-linux.~g; s~/(download|tag)/v[0-9a-z.-]+~/\1/v$version~;" README.md
3333

3434
echo -e "Releasing bwt v$version\n================\n\n$changelog\n\n"
3535

@@ -82,7 +82,7 @@ fi
8282

8383
if [ -z "$SKIP_PUBLISH_NPM_DAEMON" ]; then
8484
echo Publishing bwt-daemon to npm...
85-
(cd contrib/nodejs-bwt-daemon && npm publish)
85+
npm publish dist/nodejs-bwt-daemon-$version.tgz
8686
fi
8787

8888
if [[ -z "$SKIP_UPLOAD" && -n "$GH_TOKEN" ]]; then

src/interface.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ mod ffi {
9292
detail_n as u32,
9393
detail_s.as_ptr(),
9494
);
95+
// drop CStrings
9596
}
9697

9798
// Spawn a thread to receive mpsc progress updates and forward them to the callback_fn

src/util/descriptor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl DescKeyInfo {
7474

7575
ensure!(
7676
valid_networks,
77-
"Descriptor xpubs do not match the configured network {}",
77+
"xpubs do not match the configured network {}",
7878
network
7979
);
8080

src/wallet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl WalletWatcher {
8181
}
8282
if wallets.is_empty() {
8383
error!("Please provide at least one wallet to track (via --descriptor, --xpub or --bare-xpub).");
84-
bail!("no xpubs provided");
84+
bail!("No descriptors/xpubs provided");
8585
}
8686
Self::new(wallets)
8787
}

0 commit comments

Comments
 (0)