Commit Graph

611 Commits

Author SHA1 Message Date
yyforyongyu
27b9273e2f
itest: move channel graph related tests into one file 2021-07-13 14:58:59 +08:00
yyforyongyu
a20f857987
itest: move balance related tests into one file 2021-07-13 14:58:59 +08:00
yyforyongyu
9337f94f0d
itest: move recovery related tests into one file 2021-07-13 14:58:59 +08:00
yyforyongyu
0759771134
itest: move channel openning related tests into one file
This commit creates the file lnd_open_channel_test.go to hold channel
opeopenning related tests.
2021-07-13 14:58:59 +08:00
yyforyongyu
12ca07c089
itest: move testFundingPersistence to lnd_funding_test.go 2021-07-13 14:58:59 +08:00
yyforyongyu
47c40373de
itest: move channel policy update test into one file 2021-07-13 14:58:58 +08:00
yyforyongyu
3f78a5da10
itest: move channel force close test into one file 2021-07-13 14:58:58 +08:00
yyforyongyu
e3f2cf1711
itest: move switch related tests into one file
This commit creates the lnd_switch_test.go file to hold switch related
tests, further breaking down the lnd_test.go file.
2021-07-13 14:58:58 +08:00
yyforyongyu
6ca068660c
itest: move revocation related tests into one file
This commit creates a new file lnd_revocation_test.go to hold
revocation-related tests, further breaking down the lnd_test.go file.
2021-07-13 14:58:56 +08:00
yyforyongyu
f62cdf7bfc
itest: move payment related tests into one file
This commit creates a new file lnd_payment_test.go to hold all payment
related tests, further breaking down the old large lnd_test.go.
2021-07-13 14:52:08 +08:00
yyforyongyu
b657a977e3
itest: refactor assertNumConnections to use wait.NoError
This commit refactors the function assertNumConnections to use
wait.NoError. Prior to this commit, `make lint` will fail on this
function. While fixing it, it's noticed that wait.NoError suits the
case so it's refactored to use it.
2021-07-13 14:52:08 +08:00
yyforyongyu
0612ced087
itest: use require in assertions 2021-07-13 14:52:08 +08:00
yyforyongyu
6f0da73ee1
itest: move assertions into one file
This commit breaks down the lnd_test.go file by moving assertion-related
functions into the file assertions.go.
2021-07-13 14:52:08 +08:00
Joost Jager
98e75b486d
itest: add db backend flag 2021-07-05 10:10:02 +02:00
Joost Jager
387f1ef274
lntest: abstract db backup and restore 2021-07-05 09:20:19 +02:00
Olaoluwa Osuntokun
39ac0ebe41
lntest/itest: add new whitelisted error 2021-07-01 18:26:04 -07:00
Olaoluwa Osuntokun
6d5ab035c5
Merge pull request #5280 from champo/interceptor_dont_leak_htlcs
htlcswitch: set sourceRef when resolving packets through interceptor
2021-07-01 17:35:26 -07:00
Juan Pablo Civile
6e4528515e lntest/itest: verify HTLC interceptor renotification bug 2021-06-30 09:42:52 -03:00
yyforyongyu
7c64e0445a
itest: test anchor sweep with commitment deadline 2021-06-29 20:30:53 +08:00
yyforyongyu
26858da59d
itest: change feeServiceTarget to be 1 2021-06-29 20:25:47 +08:00
yyforyongyu
a77225ba9e
itest: allow set fee rate with conf target
In this commit, we add a method in fee service to allow specifying a fee
rate with a conf target.
2021-06-29 20:25:47 +08:00
yyforyongyu
1abc5f8b00
chainfee: change min conf target to be 1
This commit changes the minBlockTarget used by the WebAPIEstimator to be
1, inline with the bitcoind's accepted min conf target.
2021-06-29 20:25:46 +08:00
Olaoluwa Osuntokun
44e461b233
Merge pull request #5428 from wpaulino/enforce-anchor-reserve
lnwallet: prevent anchor reserve enforcement on legacy inbound channel
2021-06-28 16:08:43 -07:00
yyforyongyu
310e923170
itest: use require inside net.EnsureConnected/net.ConnectNodes 2021-06-29 01:41:48 +08:00
Olaoluwa Osuntokun
e62f0e1f3a
Merge pull request #5429 from Roasbeef/itest-recovery-shutdown
lntest: retry node shutdown attempts to recovery tests
2021-06-24 18:43:39 -07:00
Olaoluwa Osuntokun
198ac3482c
Merge pull request #5332 from yyforyongyu/5259-routing-fix-state
routing: fix payment state and refactor payment lifecycle tests
2021-06-24 18:42:17 -07:00
Olaoluwa Osuntokun
5bd84e2a60
lntest: retry node shutdown attempts to recovery tests
In #5364 we added a new error path in the `StopDaemon` method to return
an error if shutdown was attempted while a rescan/recover instance was
in progress. Since the wallet actually won't fully stop (atm)
mid-recovery, the call effectively didn't do anything in that scenario,
so we started to return an error to properly reflect that. However this
causes certain itests to fail, as during recovery, the stop attempt will
fail leading to the test itself failing.

In this commit, we wrap the calls to stop a running daemon within a
`wait.NoError` call so we'll continually try to shut down the daemon
rather than quit on the first try.

Fixes #5423.
2021-06-24 15:37:32 -07:00
Wilmer Paulino
d7299802d4
itest: extend testAnchorReservedValue to open additional channels
We do this to trigger a bug that will be resolved in a follow-up commit.
This bug prevents inbound legacy channels from being rejected by the
recipient if they have at least one anchor channel already opened
without an on-chain balance.
2021-06-23 18:24:30 -07:00
yyforyongyu
54ed6c271b
itest: silence depreciation warnings 2021-06-23 20:35:28 +08:00
yyforyongyu
193d149d48
itest: test channel policy update in private channels 2021-06-23 20:35:28 +08:00
yyforyongyu
319cc533a6
itest: fix make lint 2021-06-23 20:35:28 +08:00
yyforyongyu
e10bd84a4f
itest: moving routing related tests into one file 2021-06-23 20:35:23 +08:00
carla
6aa37066b2
server: send 0 bandwidth hints for links that can't add htlc 2021-06-22 15:39:33 +02:00
Olaoluwa Osuntokun
2fd75ace9d
Merge pull request #5374 from yyforyongyu/itest-use-require-sendcoin
itest: use require inside net.SendCoins
2021-06-18 14:12:39 -07:00
Olaoluwa Osuntokun
16bce31e46
Merge pull request #5348 from yyforyongyu/fix-itest-channel-close
itest: fix wrong node queried for balance
2021-06-18 14:09:19 -07:00
Olaoluwa Osuntokun
a4d4d5f8dc
Merge pull request #5299 from C-Otto/insufficient-bandwidth-log
add detailed log message for "insufficient bandwidth" error
2021-06-18 14:07:15 -07: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
yyforyongyu
a60db53a5a
itest: fix wrong node queried for balance 2021-06-03 19:55:25 +08:00
Conner Fromknecht
d6f88cbe6f
lnrpc: allow payment addr override for AMP invoices
This permits an AMP invoice to be "pseudo-reusable", where the invoice
paramters can be used multiple times so long as a new payment address is
supplied. This prevents additional round trips between payer and payee
to obtain a new invoice, even though the payments/invoices won't be
logically associated via the RPC interface like they would when the full
reusable invoices are deployed.
2021-05-28 09:30:05 -07:00
Conner Fromknecht
a765ba1f3d
lntest/mpp_test: ensure ctx.alice and ctx.bob are shutdown
Not doing so prevents consecutive subtests from starting properly.
2021-05-28 09:30:05 -07:00
Carsten Otto
4b4d34fcce htlcswitch: change errors to warnings
for issues caused by bogus incoming HTLC data
2021-05-23 19:17:59 +01:00
Oliver Gugger
e39d00900c
Merge pull request #5260 from guggero/windows-itest
Travis: fix Windows itest
2021-05-14 12:57:51 +02:00
Oliver Gugger
e4873ac878
lntest: re-use P2P ports during SCB recovery
In some rare instances it can happen that the nodes don't find each
other again after one of them has been re-created and the other one has
been restarted in the SCB tests. By making sure the re-created has the
same P2P port again as before, we make sure they can connect to each
other again successfully for executing DLP.
2021-05-14 10:59:10 +02:00
Oliver Gugger
702dda6448
itest: reconnect nodes more quickly on SCB restore
Since there is a lot of connecting and disconnecting between nodes in
the channel backup tests, we try to speed up that process by lowering
the min backoff from 1 second to 50 milliseconds. We also make sure we
never wait more than 1 second if it does take multple attempts. This
should sum up and hopefully speed up our tests a bit.
2021-05-14 10:09:04 +02:00
Olaoluwa Osuntokun
7ab5906093
Merge pull request #5245 from bhandras/kvdb_module
kvdb: make kvdb a top level submodule to allow dependency in other projects
2021-05-13 15:59:20 -07:00
Olaoluwa Osuntokun
c0acdd8082
Merge pull request #5036 from halseth/breacharbiter-justice-splitting
[breacharbiter] Split justice tx in case of delayed confirmation.
2021-05-12 13:42:42 -07:00
Olaoluwa Osuntokun
86c5e483b2
Merge pull request #5206 from carlaKC/4987-heightexpirywatcher
invoices: add height based expiry watcher
2021-05-12 13:41:52 -07:00
Olaoluwa Osuntokun
dc73a23e81
Merge pull request #5253 from cfromknecht/amp-invoice
Support paying AMP invoices via SendPaymentV2
2021-05-12 13:38:42 -07:00
Johan T. Halseth
3aa5e650fb
lntest/mock: set input index on spend event 2021-05-12 12:32:28 +02:00