82 Commits

Author SHA1 Message Date
LLFourn
d60c5003bf
Merge testutils crate into the main crate
This avoids having to keep the apis in sync between the macros and the
main project.
2021-05-19 16:45:48 +10:00
LLFourn
fcae5adabd
Run blockchain tests on esplora
They were only being run on electrum before.
2021-05-19 15:47:44 +10:00
LLFourn
465ef6e674
Roll blockchain tests proc macro into normal macro
This means one less crate in the repo. Had to do a Default on TestClient
to satisfy clippy.
2021-05-18 20:02:33 +10:00
Riccardo Casatta
192965413c
Convert upper-case acronyms as suggested by CamelCase convention
see https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
2021-04-07 22:14:54 +02:00
LLFourn
882a9c27cc
Use tagged serialization for blockchain config
also make the config types Clone and PartialEq
2021-04-03 15:30:49 +11:00
Steve Myers
12ae1c3479
Update license to Apache 2.0 or MIT, copyright to Bitcoin Dev Kit Developers 2021-03-03 13:23:25 -08:00
Alekos Filini
1cbd47b988
Merge commit 'refs/pull/285/head' of github.com:bitcoindevkit/bdk 2021-02-26 10:14:01 +01:00
LLFourn
a7183f34ef
s/UTXO/LocalUtxo/g
Since this struct has a "keychain" it is not a general "UTXO" but a
local wallet UTXO.
2021-02-26 13:33:52 +11:00
Tobin Harding
2b5e177ab2
Use lazy_static
`lazy_static` is not imported, this error is hidden behind the
`compact_filters` feature flag.
2021-02-24 13:30:48 +11:00
Tobin Harding
24df438607
Remove useless question mark operator
Clippy emits:

  warning: Question mark operator is useless here

No need to use the `?` operator inside an `Ok()` statement when
returning, just return directly.
2021-02-24 13:30:48 +11:00
Tobin Harding
ba8ce7233d
Allow mutex_atomic
Clippy complains about use of a mutex, suggesting we use an
 `AtomicUsize`. While the same functionality _could_ be achieved using an
 `AtomicUsize` and a CAS loop it makes the code harder to reason about
 for little gain. Lets just quieten clippy with an allow attribute and
 document why we did so.
2021-02-24 13:30:47 +11:00
Steve Myers
c90a1f70a6
Fix clippy warn on compact_filters peer::_recv() 2021-02-12 22:23:48 -08:00
Alekos Filini
19eca4e2d1
[compact_filters] Use the new rust-bitcoin API 2021-02-05 16:51:46 -05:00
Tobin Harding
03b7c1b46b
Use contains combinator
As suggested by clippy, use the `contains` combinator instead of doing
manual range check on floats.
2021-01-18 10:46:12 -08:00
Riccardo Casatta
2b669afd3e
Permit to not set timeout in ElectrumBlockchainConfig
Allowing to use socks5 which requires None timeout
2021-01-11 14:06:56 +01:00
Steve Myers
5034ca2267
Fix clippy warnings for compact_filters feature 2020-12-30 19:23:35 -08:00
LLFourn
656c9c9da8
Use () to indicate a missing blockchain
So that:
1. There are no runtime errors
2. There less type annotations needed
3. Less traits and stuff to document
2020-12-23 14:52:29 +11:00
Steve Myers
2325a1fcc2
[docs] Format code in docs with '--config format_code_in_doc_comments=true' 2020-12-16 15:12:51 -08:00
Steve Myers
fb5c70fc64
[docs] Replace all 'allow(missing_docs)' with basic docs 2020-12-16 15:12:49 -08:00
Riccardo Casatta
680aa2aaf4
[docs] fix NetworkMessage::Ping docs link 2020-12-16 12:11:26 +01:00
Alekos Filini
1713d621d4
Rename ScriptType to KeychainKind
This avoids confusion with the "type of script".
2020-12-14 17:14:24 +01:00
Alekos Filini
c83cec3777
Merge commit 'refs/pull/221/head' of github.com:bitcoindevkit/bdk 2020-12-14 11:27:51 +01:00
Steve Myers
f8d3cdca9f
[docs] Add experimental warning to compact_filters and policy modules 2020-12-13 21:04:17 -08:00
Alekos Filini
9bafdfe2d4
[docs] Various fixes to the docs 2020-12-11 11:16:38 +01:00
Alekos Filini
aed2414cad
Merge commit 'refs/pull/214/head' of github.com:bitcoindevkit/bdk 2020-12-07 11:57:32 +01:00
Alekos Filini
592c37897e
Merge commit 'refs/pull/213/head' of github.com:bitcoindevkit/bdk 2020-12-07 11:57:03 +01:00
Alekos Filini
eef59e463d
Merge commit 'refs/pull/210/head' of github.com:bitcoindevkit/bdk 2020-12-07 11:21:21 +01:00
Alekos Filini
8d9365099e
Merge commit 'refs/pull/208/head' of github.com:bitcoindevkit/bdk 2020-12-07 11:09:40 +01:00
Riccardo Casatta
9028d2a16a
[docs] compact_filters/mod.rs 2020-12-05 13:25:57 +01:00
Riccardo Casatta
81519555cf
generalize impl_error! macro so that used for other errors type 2020-12-04 11:23:01 +01:00
Riccardo Casatta
586b874a19
Remove EsploraHeader json in favor of raw hex block header 2020-12-04 11:04:31 +01:00
LLFourn
8dcb75dfa4
Replace UTXO::is_internal with script_type
This means less conversion and logic mapping from bool to ScriptType and
back again.
2020-12-04 10:46:25 +11:00
Steve Myers
2e7f98a371
Fix docs 2020-12-02 16:57:59 -08:00
Riccardo Casatta
a89dd85833
allow missing docs on self-explanatory variants 2020-12-02 14:19:46 -08:00
Riccardo Casatta
a766441fe0
missing docs for esplora.rs (also remove useless pubs) 2020-12-02 14:19:41 -08:00
Riccardo Casatta
68db07b2e3
Missing docs for electrum.rs 2020-12-02 14:19:35 -08:00
Alekos Filini
59482f795b
[blockchain] Fix clippy warnings 2020-12-01 14:41:59 +01:00
Riccardo Casatta
6d1d5d5f57
use electurm-client updated 2020-11-30 13:25:23 +01:00
Riccardo Casatta
c9079a7292
Allow to set concurrency in Esplora config and optionally pass it in repl 2020-11-18 11:55:20 +01:00
Riccardo Casatta
4c59809f8e
Make esplora call in parallel 2020-11-18 11:08:19 +01:00
Riccardo Casatta
ae16c8b602
fix typo 2020-11-18 09:27:01 +01:00
Riccardo Casatta
b79fa27aa4
Remove unused varaint HeaderParseFail 2020-11-17 18:54:34 +01:00
Riccardo Casatta
42480ea37b
Bring less data around 2020-11-17 16:38:19 +01:00
Riccardo Casatta
02c0ad2fca
eagerly unwrap height option, save one collect 2020-11-17 16:37:10 +01:00
Riccardo Casatta
16fde66c6a
use flatten instead of unwrap_or 2020-11-17 15:24:26 +01:00
Riccardo Casatta
2844ddec63
avoid a max() call by checking minus or equal 2020-11-17 15:20:33 +01:00
Riccardo Casatta
7a58d3dd7a
Use filter_map instead of filter and map 2020-11-17 15:16:18 +01:00
Riccardo Casatta
4d1617f4e0
use proper type for EsploraHeader, make conversion to BlockHeader infallible 2020-11-17 15:08:04 +01:00
Riccardo Casatta
2f39a19b01
Use our Instant struct to be compatible with wasm 2020-11-17 14:25:27 +01:00
Riccardo Casatta
c5dba115a0
[sync] Improve sync
Make every request in batch, to save round trip times
Fetch timestamp of blockheader to populate timestamp field in transaction
Remove listunspent requests because we can compute it from our history
2020-11-17 09:39:43 +01:00