Antoine Poinsot
cce227f80f
bitcoin: interface to get the common block in our and the backend's chains
...
This will be used to get the common ancestor in the chain upon detecting
a block chain reorganization.
2022-10-17 10:26:23 +02:00
Antoine Poinsot
8b4866158b
daemon: clippification
...
That's a minimal API break because of some error variants that were
Box'd.
2022-10-13 14:24:24 +02:00
Antoine Poinsot
c9b6c6dedb
db: re-rename list_unspent_coins into unspent_coins
2022-10-12 17:19:27 +02:00
edouard
3cf6bcbb98
add spent_coins to bitcoind poller
2022-10-05 17:41:16 +02:00
edouard
94ee94edbd
Add blocktime and spent_at to coins table
...
Spent coins are coins where spent_txid and spent_at
are both not null.
2022-10-05 17:41:16 +02:00
Antoine Poinsot
c73e8a42dd
commands: add a new 'delspendtx' command
2022-10-01 14:05:27 +02:00
Antoine Poinsot
c6e004806a
commands: add a 'list_spend' command (and 'listspendtxs' RPC)
2022-10-01 13:33:08 +02:00
Antoine Poinsot
bafcadf398
db: interface to upsert a Spend PSBT and query it by txid
...
I initially wanted to have a bridge table between the 'coins' and
'spend_transactions' table as we do in revaultd. But let's not optimize
to early, we'll see if/when we need it.
2022-09-15 11:41:33 +02:00
Antoine Poinsot
46320d5fc0
db: an interface to query coins by their outpoints
2022-09-15 11:41:29 +02:00
Antoine Poinsot
0fd57db8a8
Use the descriptor newtype instead of the raw miniscript Descriptor type
2022-08-18 12:02:27 +02:00
Antoine Poinsot
869d370daa
descriptors: introduce an InheritanceDescriptor type
...
We check it when creating it either from material or from string.
2022-08-18 12:02:26 +02:00
Antoine Poinsot
99a9cbf0f8
poller: query derivation index by address from DB
2022-08-18 12:01:26 +02:00
Antoine Poinsot
3f17e9f0c3
database: change interface from update_der_index to increment_der_index
...
And take care of updating the (addr->index) mapping in the SQLite implementation.
2022-08-18 12:01:26 +02:00
Antoine Poinsot
c6a25adfcd
bitcoin: interface for coins discovery and updates
2022-08-18 12:01:24 +02:00
Antoine Poinsot
05b3af1b5a
database: interface and implementation for coins storage and update
2022-08-18 12:01:24 +02:00
Antoine Poinsot
fe5de96312
Shorten the paths to the dummy datadirs in the unit tests
...
It failed CI on MacOS because of overflowing SUN_PATH_LEN.
2022-08-17 19:40:00 +02:00
Antoine Poinsot
726209cc0a
jsonrpc: add a 'stop' command
...
This also implements a simple JSONRPC server sanity check
And introduces a new tmp_dir() test utility, that i didn't have the courage to split from this commit
2022-08-17 19:39:57 +02:00
Antoine Poinsot
d03c469967
Introduce a testutils module with a DummyMinisafe for unit tests
...
So we can have unit tests without a dummy bitcoind thread, as we
currently do for the startup test.
This commit also implements sanity checks for the two existing commands
using this mechanism.
2022-08-17 19:39:56 +02:00