26 Commits

Author SHA1 Message Date
edouardparis
61bc0ffbc8 tests: use data_directory 2025-04-23 18:53:56 +02:00
Michael Mallan
1c0338610f
commands: add is_from_self to listcoins response 2024-12-02 10:08:18 +00:00
jp1ac4
371e31e3f3
func test: allow to run using electrs backend 2024-09-05 14:55:53 +01:00
jp1ac4
deb75884bf
tests: run black 2024-03-28 11:03:15 +00:00
jp1ac4
3a7c151674
database: allow for coinbase transactions to change addresses
`is_change` is `true` for a coin if its address is derived
from our change descriptor and could in principle be used for a
coinbase transaction.

The functional test was provided by darosior in a PR comment:
https://github.com/wizardsardine/liana/pull/1001#pullrequestreview-1948564150
2024-03-20 18:29:37 +00:00
Antoine Poinsot
ecef6bff5e
qa: functional tests lianad using Taproot descriptors
We introduce Taproot support in the test framework through a global
toggle. A few modifications are made to some tests to adapt them under
Taproot (notably the hardcoded fees / amounts).

This is based on my introduction of a quick and dirty support for
TapMiniscript in my python-bip380 library:
https://github.com/darosior/python-bip380/pull/23. In addition to this i
didn't want to implement a signer in the Python test suite so here we
introduce a simple Rust program based on our "hot signer" which will
sign a PSBT with an xpriv provided through its stdin and output the
signed PSBT on its stdout. Eventually it would be nicer to have a Python
signer instead of having to call a program.

The whole test suite should pass under both Taproot and P2WSH. Only a
single test is skipped for now under Taproot since it needs a finalizer
in the test suite.

I also caught a bug in the RBF tests which i fixed in place.
2024-03-13 19:21:52 +01:00
Antoine Poinsot
bdf8b8f625
Rename IS_BITCOIND_25 to IS_NOT_BITCOIND_26
for f in ; do sed -i 's/IS_BITCOIND_25/IS_NOT_BITCOIND_24/g' tests/test_misc.py; done
2024-02-27 14:18:04 +01:00
Antoine Poinsot
6d2833fc18
Drop watchonly wallet migration for old Windows datadir
It was introduced in v2 (released in August 2023) for migrating datadir created using Liana v1 (May 2023).
2023-12-20 11:21:51 +01:00
jp1ac4
fdab722eff
func tests: run black 2023-11-28 13:55:25 +00:00
Antoine Poinsot
0a95266cce
qa: don't use a static dummy origin for descriptor xpubs 2023-10-08 11:50:58 +02:00
Antoine Poinsot
5680ad27ec
lib: on Windows, migrate the watchonly wallet from bitcoind datadir
We used to store it there, if it's not within our own datadir copy it
from where it would have been stored by Liana v1.

Note we don't conditionally compile this on Windows so the codepath can
be tested with a functional test.
2023-08-30 17:51:53 +02:00
Antoine Poinsot
0f6fc48e88
qa: only run the RPC retry functional test with bitcoind 25.0 2023-08-09 15:50:22 +02:00
Antoine Poinsot
be2030af28
qa: unflake the test_retry_on_workqueue_exceeded functional test
This was racy as it was relying on the `waitfornewblock` timeout, so it
would occasionally fail in CI.

Make this test more robust by having `waitfornewblock` wait indefinitely
and submitting a block through the P2P interface to unstuck it.
2023-08-09 12:55:58 +02:00
Antoine Poinsot
097d5e71c1
qa: adapt the migration functional test to also support 1.0 2023-07-20 13:48:33 +02:00
Antoine Poinsot
95dd3e5293
qa: fix and improve the coinbase deposit functional test 2023-07-20 13:43:14 +02:00
Antoine Poinsot
43a0cf232b
test_misc.py: linter 2023-07-13 10:18:08 +02:00
Antoine Poinsot
c421610b30
qa: test we retry requests to bitcoind when it's overloaded 2023-07-13 10:18:07 +02:00
Antoine Poinsot
96ff447fc9
tests: add a datadir migration functional test
This is currently to test database migrations at the functional level, but
is also more generally useful to test backward compatibility.
2023-04-05 17:30:01 +02:00
Antoine Poinsot
7211b96ca9
tests: extend the recovery functional tests for multipath descriptors 2023-04-04 11:53:24 +02:00
Antoine Poinsot
b20cdd0cd8
tests: introduce a lianad_multipath fixture as well as a trivial test 2023-04-04 11:53:24 +02:00
Antoine Poinsot
0d75f0a2c7
tests: handle multiple recovery paths in MultiSigner 2023-04-04 11:53:23 +02:00
Antoine Poinsot
75ea367235
tests: make most of the body of the multisig test a general helper
We'll exercise the same commands for the multipath test, except for the
recovery. DRY.
2023-04-04 11:53:22 +02:00
Antoine Poinsot
af058d59e3
bitcoind: detect deposits from (mature) coinbase transactions 2023-02-04 13:21:20 +01:00
Antoine Poinsot
9290596823
qa: test using lianad with a multisig descriptor 2023-01-24 19:38:35 +01:00
Antoine Poinsot
968a7d17a0
daemon: rename Minisafe to Liana 2022-11-17 17:10:22 +01:00
Antoine Poinsot
7c3289fda9
tests: add a functional test framework, adapted from revaultd 2022-07-25 16:31:35 +02:00