Commit Graph

13973 Commits

Author SHA1 Message Date
yyforyongyu
200796b8e2
itest: refactor testMultiHopHtlcLocalChainClaim 2022-10-27 01:11:33 +08:00
yyforyongyu
f65002255c
itest: refactor testMultiHopRemoteForceCloseOnChainHtlcTimeout 2022-10-27 01:11:32 +08:00
yyforyongyu
6b5f4f407c
itest: refactor testMultiHopLocalForceCloseOnChainHtlcTimeout 2022-10-27 01:11:32 +08:00
yyforyongyu
d51f98efc6
itest: refactor testMultiHopReceiverChainClaim 2022-10-27 01:11:32 +08:00
yyforyongyu
5a7c6cea02
lntest+lntemp: refactor testMultiHopHtlcLocalTimeout 2022-10-27 01:11:32 +08:00
yyforyongyu
4a7f45b5d4
itest+lntemp: refactor testMultiHopHtlcClaims 2022-10-27 01:11:32 +08:00
yyforyongyu
e629a3b45a
itest: deprecate createThreeHopNetwork 2022-10-27 01:11:32 +08:00
yyforyongyu
36c84bbd43
itest: refactor testDataLossProtection 2022-10-27 01:11:32 +08:00
yyforyongyu
e8dc15dae4
lntemp: add supporting methods for testDataLossProtection 2022-10-27 01:11:31 +08:00
yyforyongyu
1fafabe012
itest: move testDataLossProtection to backup test file 2022-10-27 01:11:31 +08:00
yyforyongyu
8cd5a9b6b1
itest: refactor testChannelBackupRestore 2022-10-27 01:11:31 +08:00
yyforyongyu
2966773018
lntemp: add more assertions and supporting methods 2022-10-27 01:11:31 +08:00
yyforyongyu
8518f3bea9
lntemp: support creating node from a seed 2022-10-27 01:11:31 +08:00
yyforyongyu
f9453cbe97
lntemp: fix context inheritance
This commit changes how the context is created and inherited to better
reflex the relationship of the components. We now have the following
context structure,
```
For ephemeral nodes, the context chain is,
main HarnessTest -> sub HarnessTest -> HarnessNode -> HarnessRPC

For standby nodes, the context chain is,
main HarnessTest -> standby HarnessNode -> HarnessRPC
```
2022-10-27 01:11:31 +08:00
yyforyongyu
352be086a1
lntemp: replace pubkeyStr with NodeID
This commit replaces the keys used in the maps `activeNodes` and
`standbyNodes` from `pubkeyStr` to `NodeID` such that even the node is
not properly started, we can still clean it up during shutdown.
2022-10-27 01:11:31 +08:00
yyforyongyu
1b741cb6cc
itest: refactor testExternalFundingChanPoint 2022-10-27 01:11:30 +08:00
yyforyongyu
1d135c1409
lntemp: expand package to support testExternalFundingChanPoint 2022-10-27 01:11:30 +08:00
yyforyongyu
773cc8e295
itest: refactor testBasicChannelFunding
The test `testExternalFundingChanPoint` is commented out and will be put
back in the following commit.
2022-10-27 01:11:30 +08:00
yyforyongyu
19981ac9bd
lntemp: expand package to support testBasicChannelFunding
This commit adds more supporting methods to support the test
`testBasicChannelFunding`.
2022-10-27 01:11:30 +08:00
yyforyongyu
85210b947f
itest: deprecate deriveFundingShim 2022-10-27 01:11:30 +08:00
Oliver Gugger
359a5638f5
Merge pull request #6840 from positiveblue/fix-warning-messages
Fix warning messages
2022-10-26 19:08:21 +02:00
positiveblue
cba5095902
docs: add release notes for warning message fix 2022-10-26 08:09:12 -07:00
positiveblue
4d4d8e480c
multi: stop casting peer warning messages as errors
Split the logic for processing `error` and `warning` messages from our
peers.
2022-10-26 08:09:08 -07:00
Oliver Gugger
e65f05360e
Merge pull request #7085 from bottlepay/graph-tlv
rpcserver: expose graph tlv
2022-10-26 13:17:35 +02:00
Joost Jager
6e073cb213
rpcserver: expose graph tlv data 2022-10-25 18:17:35 +02:00
Joost Jager
0663a92bff
rpcserver: extract marshalNode 2022-10-25 18:17:34 +02:00
Joost Jager
01e7f09dfb
rpcserver: extract marshalDBRoutingPolicy 2022-10-25 15:24:48 +02:00
Oliver Gugger
c4f4630902
Merge pull request #7076 from yyforyongyu/tune-linters
golangci: fine-tune enabled linters
2022-10-25 09:44:57 +02:00
yyforyongyu
f27364f467
golangci: customize dupl, funlen, nestif, and nlreturn [skip ci] 2022-10-25 14:11:56 +08:00
yyforyongyu
a5f57c6c3e
golangci: disable linters to match our code style 2022-10-25 02:54:48 +08:00
Oliver Gugger
d9e32f39c2
Merge pull request #7064 from yyforyongyu/fix-linter
lint: enable line too long check and other linters
2022-10-24 09:21:57 +02:00
Oliver Gugger
bac7e6360e
Merge pull request #7056 from guggero/watch-only-seed-birthday
wallet: use correct birthday timestamp when creating watch-only wallet
2022-10-24 09:21:27 +02:00
yyforyongyu
87ac3a928c
docs: update release note 2022-10-21 17:19:12 +08:00
yyforyongyu
2fa2f24700
golangci: enable new linters
Only newly added code will trigger these linter checks.
2022-10-20 23:59:10 +08:00
yyforyongyu
4db6617d45
multi: skip checking long lines for config files 2022-10-20 23:59:09 +08:00
yyforyongyu
3e593be053
golangci: enable linter lll for long line check
Enables "line too long" check for new code.
2022-10-20 23:59:04 +08:00
Oliver Gugger
8c66353e4c
Merge pull request #7001 from hieblmi/fwdinghistory-alias-info
lncli: incoming and outgoing peer alias in `fwdinghistory`
2022-10-20 17:16:47 +02:00
Oliver Gugger
dfc526b8b4
Merge pull request #7025 from ellemouton/cantRemoveTowerDuringNegotiation
watchtower: introduce an AddressIterator
2022-10-20 16:57:38 +02:00
Elle Mouton
ca05335083
docs: update release notes with #7025 2022-10-20 15:46:57 +02:00
Elle Mouton
3ff5abc9e3
watchtower: allow removal during session negotiation
In this commit, the bug demonstrated in the previous commit is fixed.
The locking capabilities of the AddressIterator are used to lock
addresses if they are being used for session negotiation. So now, when a
request comes through to remove a tower address then a check is first
done to ensure that the address is not currently in use. If it is not,
then the request can go through.
2022-10-20 15:46:56 +02:00
Elle Mouton
b2039f245e
watchtower: demo cant remove tower during negotiation bug
In this commit, a new test is added to demonstrate that an error is
thrown if a user attempts to remove a tower during session negotiation
even if no current negotiation is taking place with the tower.
2022-10-20 15:46:55 +02:00
Elle Mouton
8a7329b988
watchtower: make use of the new AddressIterator
This commit upgrades the wtclient package to make use of the new
`AddressIterator`. It does so by first creating new `Tower` and
`ClientSession` types. The new `Tower` type has an `AddressIterator`
instead of a list of addresses. The `ClientSession` type contains a
`Tower`.
2022-10-20 15:46:52 +02:00
Elle Mouton
7924542500
watchtower: add AddressIterator and tests
In this commit, a new AddressIterator type is added. It is a type that
can be used to iterate over a list of addresses. It strictly disallows
the list of addresses it holds to be empty. It also allows callers to
place locks on certain addresses in order to prevent other callers from
removing the addresses in question from the iterator.
2022-10-20 15:46:03 +02:00
Slyghtning
2189bb4ba6 docs: update release notes 2022-10-20 09:23:50 -04:00
Slyghtning
85f0ec2954 itest: check peer alias in ForwardingHistory 2022-10-20 09:23:50 -04:00
Slyghtning
3e4c98c938 rpcserver: enrich ForwardingHistory with peer alias
In this commit a helper method in ForwardingHistory is introduced that enriches
each ForwardingEvent by peer alias names for the incoming and outgoing channel.
2022-10-20 09:23:47 -04:00
Elle Mouton
5bc8ee48fc
watchtower: demo that client cant update tower address
In this commit, a test is added to demonstrate that if a client tries to
update the address of a tower for an active tower session, then this new
address will not be used until the client restarts. This is a bug that
will be fixed in a future commit.
2022-10-20 11:32:08 +02:00
Elle Mouton
60f58b7812
watchtower: simplify the newHarness test function 2022-10-19 18:49:18 +02:00
Elle Mouton
4828fd902d
wtclient: allow multiplie callback dial functions
This commit is a step towards prepping the watchtower client test
harness to be able to handle the case where the client connects to
multiple mock servers.
2022-10-19 18:49:18 +02:00
Elle Mouton
ab4d4a19be
watchtower/wtclient: upgrade pkg to use require
Upgrade all the tests in the wtclient package to make use of the
`require` package.
2022-10-19 18:49:17 +02:00