Commit Graph

24 Commits

Author SHA1 Message Date
Oliver Gugger
6c495c1bbe itest: add Taproot PSBT signing tests 2022-05-11 10:07:51 +02:00
Oliver Gugger
fe30b9e987 itest: refactor PSBT signing itest 2022-05-11 10:07:51 +02:00
Oliver Gugger
7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Oliver Gugger
8994d86a1d walletrpc+itest: add SignPsbt RPC 2022-01-06 14:35:07 +01:00
Martin Habovstiak
2b3b70d40b test: don't enforce reserved value in PSBT midstep
This adds an integration test that makes sure channel can be funded from
empty wallet using PSBT if the funding transaction contains an output
belonging to the wallet, satisfying the reserve.
2021-12-10 00:22:17 +01:00
yyforyongyu
26ed64fa52 itest: manage context within HarnessNode
This commit removes the context as a param needed when calling methods
of HarnessNode. This change moves the context management inside
HarnessNode, aside from saving us a few lines, it makes the context
creation/timeout less error-prone.
2021-12-04 14:54:36 +08:00
Oliver Gugger
36dc4b3abf itest: refactor tests to be re-used 2021-10-14 15:42:59 +02:00
Oliver Gugger
57253c0c05 itest: add test for fully external PSBT funding 2021-10-04 11:17:08 +02:00
yyforyongyu
a6c5255e77 itest: manage context timeout inside completePaymentRequests 2021-08-24 12:28:39 +08:00
yyforyongyu
74f8fe482d itest: manage context inside EnsureConnected 2021-08-24 11:06:44 +08:00
yyforyongyu
d10d1e3e24 itest: manage context inside SendCoins 2021-08-24 11:06:44 +08:00
yyforyongyu
8eddc50beb itest: remove context creations outside close channel assertion 2021-08-11 12:44:39 +08:00
yyforyongyu
310e923170 itest: use require inside net.EnsureConnected/net.ConnectNodes 2021-06-29 01:41:48 +08:00
yyforyongyu
6515c575bd itest: use require inside net.SendCoins
This commit refactored the function SendCoins to take a new *testing.T
so the unexpected error is handled inside it.
2021-06-10 01:29:22 +08:00
yyforyongyu
b42bb87c81 itest: use require inside net.NewNode
This commit refactored the function NewNode to take a *testing.T so that
the unexpected error is checked inside it. The caller is now free from
checking the errors.
2021-06-09 02:14:37 +08:00
Wilmer Paulino
a620ce3682 build: update btcd and btcwallet dependencies 2021-04-05 15:41:04 -07:00
eugene
caa0f5da6a multi: move and export funding-related vars to funding package
Also moves the lnd global MaxFundingAmount to server.go
2020-12-17 09:36:34 -05:00
Oliver Gugger
eb280fd248 itest: use new PSBT functions for funding flow
Now that we have all functions that we need to complete the whole
PSBT channel funding flow, we change the itest to use Dave's wallet
to fund the channel from Carol to Dave through a PSBT.
2020-10-03 10:34:56 +02:00
Oliver Gugger
f114fb3c8d itest: use require library
We rewrite the test to use the require library to make it a
bit more condensed.
2020-10-03 10:34:56 +02:00
yyforyongyu
1b200c9930 itest: explicit checking ChannelBalance response 2020-09-24 20:30:51 +08:00
Olaoluwa Osuntokun
719e32830d lntest: fix most linter warnings, silence rest
We fix all linter issues except for the 'lostcontext' and 'unparam' ones
as those are too numerous and would increase the diff even more.
Therefore we silence them in the itest directory for now.
Because the linter is still not build tag aware, we also have to silence
the unused and deadcode sub linters to not get false positives.
2020-09-21 21:16:31 +02:00
Olaoluwa Osuntokun
c769247198 lntest: allow the main test files to be buildable w/o the rpctest build tag
In this commit, we modify our build tag set up to allow the main test
files to be buildable w/o the current rpctest tag. We do this so that
those of us that use extensions which will compile live files like
vim-go can once again fix compile errors as we go in our editors.

In order to do this, we now make an external `testsCases` variable, and
have two variants: one that's empty (no build tag), and one that's fully
populated with all our tests (build tag active). As a result, the main
file will now always build regardless of if the build tag is active or
not, but we'll only actually execute tests if the `testCases` variable
has been populated.

As sample run w/ the tag off:
```
=== RUN   TestLightningNetworkDaemon
--- PASS: TestLightningNetworkDaemon (0.00s)
PASS
ok  	github.com/lightningnetwork/lnd/lntest/itest	0.051s
```
2020-09-21 21:16:31 +02:00
Oliver Gugger
107e135df9 itest: test PSBT funding flow with raw final TX
As we already create two channels in our PSBT funding flow itest we can
easily just submit the final transaction for the second channel in the
raw wire format to test this new functionality.
2020-09-15 08:30:23 +02:00
Oliver Gugger
906011f278 itest: add _test file name suffix to tests
To fix the compiler of some IDEs complaining about types and functions
it cannot find, we rename all files that contain tests back to lnd_xxx_test.go to make
sure they are compiled correctly.
2020-09-04 09:50:39 +02:00