20 Commits

Author SHA1 Message Date
Riccardo Casatta
ae16c8b602
fix typo 2020-11-18 09:27:01 +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
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
Alekos Filini
0caad5f3d9
[blockchain] Fix receiving a coinbase using Electrum/Esplora
Closes #107
2020-10-13 11:56:59 +02:00
Alekos Filini
7b58a4ad6f
Fix the last_derivation_index calculation
It should be set to `0` if not transactions are found during sync.

Closes #44
2020-09-04 21:53:31 +02:00
Alekos Filini
c0867a6adc
General cleanup for the docs 2020-08-31 15:04:27 +02:00
Alekos Filini
d61e974dbe
Add the license to every file 2020-08-31 11:48:25 +02:00
Alekos Filini
9e5023670e
[tests] Add a proc macro to generate tests for OnlineBlockchain types 2020-08-10 17:18:17 +02:00
Alekos Filini
8d9ccf8d0b
[wallet] Allow limiting the use of internal utxos in TxBuilder 2020-08-10 17:18:13 +02:00
Alekos Filini
0954049df0
[wallet] Cleanup, remove unnecessary mutable references 2020-08-06 14:28:12 +02:00
Alekos Filini
4fcf7ac89e
Make the blockchain interface async again on wasm32-unknown-unknown
The procedural macro `#[maybe_async]` makes a method or every method of a trait
"async" whenever the target_arch is `wasm32`, and leaves them untouched on
every other platform.

The macro `maybe_await!($e:expr)` can be used to call `maybe_async` methods on
multi-platform code: it expands to `$e` on non-wasm32 platforms and to
`$e.await` on wasm32.

The macro `await_or_block!($e:expr)` can be used to contain async code as much
as possible: it expands to `tokio::runtime::Runtime::new().unwrap().block_on($e)`
on non-wasm32 platforms, and to `$e.await` on wasm32.
2020-07-20 20:02:24 +02:00
Alekos Filini
123984e99d
Remove async, upgrade electrum-client 2020-07-17 09:44:01 +02:00
Alekos Filini
ea62337f0d
[database] Replace DerivationPaths with single u32s 2020-06-30 15:21:14 +02:00
Alekos Filini
0cc9e1cdea
[blockchain] Use async I/O in the various blockchain impls 2020-05-07 17:36:45 +02:00
Alekos Filini
95b2cd4c32
[blockchain] add the Esplora backend 2020-05-07 15:21:54 +02:00