Commit Graph

14354 Commits

Author SHA1 Message Date
positiveblue
2942f1201b
docs: update release notes 2023-01-20 03:43:43 -08:00
positiveblue
8563e1f409
channeldb/invoices: add IsAMP and IsKeysend helpers
The only way to know if an invoice is AMP, Keysend, etc is to look at
its shape/characteristics. This commit adds a couple of helper functions
to encapsulate the logic of these checks.

If all these types cannot intersect: an invoice cannot be AMP and
Keysend or Keysend and Bolt12, etc it could be useful to add an extra
field to store this information instead of relying on checking how the
invoice looks like.
2023-01-20 03:43:39 -08:00
Oliver Gugger
0eb07c944c
Merge pull request #7330 from yyforyongyu/routing-rm-mtx
routing: remove the mutex lock inside `ChannelRouter`
2023-01-19 16:15:02 +01:00
Oliver Gugger
b5bf658780
Merge pull request #7337 from yyforyongyu/fix-unit-test
bitcoindnotify: fix subtest closure in unit tests
2023-01-19 14:54:25 +01:00
yyforyongyu
1f67d6a548
bitcoindnotify: fix subtest closure in unit tests 2023-01-19 21:06:23 +08:00
yyforyongyu
1a1fe37ad4
docs: update release notes 2023-01-19 07:08:18 +08:00
yyforyongyu
fa2c766866
routing: remove the mutex and use SyncMap instead
This commit removes the lock used to protect the map `topologyClients`
and replace the map with a `SyncMap`.
2023-01-19 07:08:18 +08:00
yyforyongyu
692cd4bc4f
lnutils+lntemp: move SyncMap to lnutils
This commit moves the `SyncMap` from `lntemp/node` into `lnutils` so it
can be used by other packages.
2023-01-19 07:08:18 +08:00
yyforyongyu
89b0e25e2c
multi: add lnutils to host fundamental utility functions
We also move the `fn/stream.go` into the package `lnutils`. Eventually
we will put all the [utility
functions](https://github.com/lightninglabs/taro/tree/main/chanutils)
into this package.
2023-01-19 06:38:50 +08:00
Oliver Gugger
48c8c1bf48
Merge pull request #6824 from yyforyongyu/5-new-itest
itest: continued itest refactor and fix - IV
2023-01-18 22:14:29 +01:00
Oliver Gugger
c38be044d3
Merge pull request #7335 from guggero/disable-gomnd
lint: disable gomnd
2023-01-18 10:43:00 +01:00
Oliver Gugger
716febc6c7
Merge pull request #7336 from positiveblue/fix-race-condition
routing: fix reace condition in `TestUpdatePaymentState`
2023-01-18 09:26:28 +01:00
yyforyongyu
107404dfb8
itest+lntemp: refactor testCustomMessage 2023-01-18 10:53:59 +08:00
yyforyongyu
faa9ba505d
docs: update release docs 2023-01-18 10:53:58 +08:00
yyforyongyu
7bd8ae08c0
lntest: fix completePaymentRequestsAssertStatus
This commit moves the assertion `AssertPaymentStatusFromStream` outside
of the goroutine so the test won't fail after the case is finished.
2023-01-18 10:53:58 +08:00
yyforyongyu
178e4b0103
lntemp+lntest: fix make lint 2023-01-18 10:53:58 +08:00
yyforyongyu
f3ad66b363
lntest+lntest: inherit node's public states when restarting it
This commit changes how a node's state is created during startup. When
it already has states, only its internal states are reset since these
info are only useful for the finished test. The name `InitRPCClients` is
changed to `Initialize` to reflect the fact that it's more than
initializing RPC clients.
2023-01-18 10:53:58 +08:00
yyforyongyu
0b0c0f12ee
lntemp+lntest: refactor testOpenChannelUpdateFeePolicy 2023-01-18 10:53:58 +08:00
yyforyongyu
1cb7ea1a0c
itest+lntemp: refactor testTrackPayments 2023-01-18 10:53:58 +08:00
yyforyongyu
368b3337bd
itest: refactor testTaprootCoopClose 2023-01-18 10:53:58 +08:00
yyforyongyu
38eaa36d90
lntemp+itest: refactor testRemoteSigner 2023-01-18 10:53:57 +08:00
yyforyongyu
b8566359da
lntemp+itest: refactor testAsyncPayments 2023-01-18 10:53:57 +08:00
yyforyongyu
9000994b7b
lntemp+itest: refactor wallet import tests 2023-01-18 10:53:57 +08:00
yyforyongyu
0176d58b85
itest: refactor testTaproot 2023-01-18 10:53:57 +08:00
yyforyongyu
8ba5f399d3
lntemp: prepare assertions for testTaproot 2023-01-18 10:53:57 +08:00
yyforyongyu
d78af3cec6
lntemp+itest: refactor testSignPsbt 2023-01-18 10:53:56 +08:00
yyforyongyu
8a04127659
itest: refactor testPsbtChanFunding 2023-01-18 10:53:56 +08:00
yyforyongyu
309ba1fcf4
lntemp+itest: refactor testCPFP 2023-01-18 10:53:56 +08:00
yyforyongyu
08dfebbd6c
lntemp+rpc: refactor testSignVerifyMessage 2023-01-18 10:53:56 +08:00
yyforyongyu
20e454b229
lntemp+itest: refactor testSignOutputRaw 2023-01-18 10:53:56 +08:00
yyforyongyu
ab23421cd8
lntemp+itest: refactor testDeriveSharedKey 2023-01-18 10:53:56 +08:00
yyforyongyu
57e208c176
lntemp+itest: refactor testBasicChannelCreationAndUpdates
We also temporarily comment out the `testRemoteSigner` test and will
bring it back when its sub tests are refacted.
2023-01-18 10:53:55 +08:00
yyforyongyu
2b11a619db
lntemp+itest: refactor testNonstdSweep 2023-01-18 10:53:55 +08:00
yyforyongyu
c4ffd8b469
itest: refactor testOptionScidUpgrade 2023-01-18 10:53:55 +08:00
yyforyongyu
48aa84a08c
itest: refactor testUpdateChannelPolicyScidAlias 2023-01-18 10:53:55 +08:00
yyforyongyu
6b82676ca2
lntemp+itest: refactor testOptionScidAlias 2023-01-18 10:53:55 +08:00
yyforyongyu
15da2a3459
itest: refactor testZeroConfChannelOpen 2023-01-18 10:53:55 +08:00
yyforyongyu
dd7e59237b
itest: refactor testForwardInterceptorBasic 2023-01-18 10:53:54 +08:00
yyforyongyu
97a7638c50
lntemp+itest: refactor testForwardInterceptorDedupHtlc 2023-01-18 10:53:54 +08:00
yyforyongyu
707d888aa4
lntemp+itest: refactor testSendToRouteAMP 2023-01-18 10:53:54 +08:00
yyforyongyu
44b9068de5
itest: refactor testSendPaymentAMP 2023-01-18 10:53:54 +08:00
yyforyongyu
23e45a192e
itest: refactor testSendPaymentAMPInvoiceRepeat 2023-01-18 10:53:54 +08:00
yyforyongyu
780f2e84a3
itest: refactor testSendPaymentAMPInvoice 2023-01-18 10:53:54 +08:00
yyforyongyu
47c5809081
lnwallet: add verbose log for ErrBelowChanReserve 2023-01-18 10:53:53 +08:00
yyforyongyu
4292c05e04
itest: refactor testSendMultiPathPayment 2023-01-18 10:53:53 +08:00
yyforyongyu
1f1123523e
lntemp+itest: refactor testSendToRouteMultiPath
This commit also introduces `mppTestScenario` which replaces the old
`mppmppTestContext` to reduce the total blocks mined during the test.
For each test case it will save 35 blocks.
2023-01-18 10:53:53 +08:00
yyforyongyu
9943bb8539
itest: refactor testSwitchOfflineDeliveryOutgoingOffline 2023-01-18 10:53:53 +08:00
yyforyongyu
874689719e
itest: refactor testSwitchOfflineDeliveryPersistence 2023-01-18 10:53:53 +08:00
yyforyongyu
476434f546
lntemp+itest: refactor testSwitchOfflineDelivery 2023-01-18 10:53:53 +08:00
yyforyongyu
baeb78e2cc
lntemp+itest: refactor testSwitchCircuitPersistence 2023-01-18 10:53:52 +08:00