Commit Graph

13973 Commits

Author SHA1 Message Date
Elle Mouton
d29a55bbb5
watchtower: make use of t.Cleanup funcs in tests
Make use of the t.Cleanup helper function to clean up watchtower client
tests instead of relying on defer calls.
2022-10-19 18:39:26 +02:00
Oliver Gugger
7274cf40d0
Merge pull request #6831 from bottlepay/interceptor-watchdog
htlcswitch: interceptor watchdog
2022-10-18 19:11:00 +02:00
Joost Jager
a0a50fa844
htlcswitch: auto-fail held htlcs
Make the interceptable switch aware of htlc expiry and fail back htlcs in-time
to prevent the counterparty from force-closing the channel.
2022-10-18 18:06:49 +02:00
Joost Jager
74eeb95e8c
htlcswitch: add error return value to NewInterceptableSwitch
Prepares for parameter validation.
2022-10-18 18:04:34 +02:00
Joost Jager
93a7cab46e
htlcswitch/test: create interceptableSwitchTestContext
Refactor to prepare for adding more tests.
2022-10-18 18:04:34 +02:00
Joost Jager
9c063db698
htlcswitch: add heldHtlcSet
Isolation of the set logic so that it will be easier to add watchdog functionality later.
2022-10-18 18:04:33 +02:00
Joost Jager
a6df9567ba
htlcswitch: add dedicated block subscription to interceptable switch
Preparation for making the interceptable switch aware of expiring htlcs.
2022-10-18 18:04:33 +02:00
Joost Jager
4a3e90f4d0
htlcswitch: add InterceptableSwitchConfig
Preparation for adding more config options.
2022-10-18 18:04:33 +02:00
Slyghtning
2db62c18a1 lncli: add flag skip_peer_alias_lookup to fwdinghistory
A new flag skip_peer_alias_lookup is introduced that communicates to the
server if the peer alias lookup per forwarding event should be skipped
in order to improve performance.
2022-10-18 11:08:03 -04:00
Slyghtning
425ce55968 lnrpc: peer_alias_in and peer_alias_out fields for ForwardingEvent 2022-10-18 11:08:00 -04:00
Oliver Gugger
95bb1999b9
docs: add release notes 2022-10-18 15:48:30 +02:00
Oliver Gugger
4fbd608b73
Merge pull request #7050 from positiveblue/build-info
[skip ci] build: fix makefile targets using `RELEASE_LDFLAGS`
2022-10-18 13:36:19 +02:00
Oliver Gugger
b17a2deaf4
config_builder: use correct birthday when creating watch-only wallet 2022-10-18 13:29:09 +02:00
positiveblue
85d88cd004
[skip ci] build: fix makefile targets using RELEASE_LDFLAGS
I forgot the `-ldflags` before setting the ldflags for the `install`
target.
2022-10-18 02:06:15 -07:00
Olaoluwa Osuntokun
c65abf8b05
Merge pull request #6759 from yyforyongyu/1-new-itest
itest: start a scaffolding testing framework
2022-10-17 20:06:48 -07:00
Olaoluwa Osuntokun
609cc8b883
lnd: add SECURITY.MD to bolster security entry in README 2022-10-17 12:05:15 -07:00
Oliver Gugger
db42e63ab7
Merge pull request #7046 from C-Otto/watchtower-docu-fixes
watchtower: docu fixes
2022-10-17 18:05:26 +02:00
Oliver Gugger
f68d047a26
Merge pull request #6963 from positiveblue/build-info
build: get binary build info from `debug/buildinfo`
2022-10-17 10:04:33 +02:00
positiveblue
a92d7ad6d3
docs: update release notes for v0.16.0-beta 2022-10-17 00:55:16 -07:00
positiveblue
5924964a9b
build: get binary build info from debug/buildinfo
Since `go1.18` the runtime has a package that provides information about module
versions, version control information, and build flags embedded in executable
files built by the go command.

The new packages allows us to get information needed by the `version` command
without having to rely on `ldflags` set at build time.

This can be really helpful while debugging errors from people using custom
binaries. For example a build from master.
2022-10-17 00:52:37 -07:00
Carsten Otto
378478eb1a multi: fix typos and grammar issues in comments [skip ci] 2022-10-17 09:40:22 +02:00
Carsten Otto
2a56f602db wtclient: fix documentation [skip ci]
the implementation also returns exhausted sessions
2022-10-17 09:40:22 +02:00
Oliver Gugger
27fdd0a5b0
Merge pull request #7048 from benthecarman/fix-comment
lnrpc: fix description of tx_index to be correct
2022-10-17 09:33:52 +02:00
benthecarman
4607dff2c3
lnrpc: fix description of tx_index to be correct[skip ci] 2022-10-16 19:59:40 -05:00
yyforyongyu
ff0b953fa2
docs: add release note for the new itest 2022-10-14 15:45:25 +08:00
yyforyongyu
b312ae24aa
lntemp: add README 2022-10-14 15:45:25 +08:00
yyforyongyu
353b744039
lntemp+itest: create interface WebFeeService
This commit adds a new interface, `WebFeeService`, so external projects
can create their own mocked fee services.
2022-10-14 15:45:25 +08:00
yyforyongyu
9d79e76876
itest: timeout while waiting for predicate result
This commit sends the returned value of pred() inside a goroutine such
that when a predicate function never returns during the first run, the
wait package can timeout properly.
2022-10-14 15:45:24 +08:00
yyforyongyu
2ab842c645
itest: refactor test testUpdateChanStatus 2022-10-14 15:45:24 +08:00
yyforyongyu
cc69634a2e
lntemp: add more methods to support testUpdateChanStatus 2022-10-14 15:45:24 +08:00
yyforyongyu
1350f76627
itest: add a new test entry point to run the temp tests
This commit adds a new function, `TestLightningNetworkDaemonTemp`, to
run the new tests.
2022-10-14 15:45:24 +08:00
yyforyongyu
645257a55f
lntemp: complete HarnessNode with setup functions
This commit adds more methods in `HarnessNode` and a `SetupHarness` helper
to easily setup a new itest.
2022-10-14 15:45:24 +08:00
yyforyongyu
a3fa4ba10a
lntemp: re-introduce HarnessTest as a test manager
This commit adds a new component, `HarnessTest`, as a test manager, which
is responsible for managing the state change in the itest. It is built
on top of `HarnessNode` and will be handling assertions so that a test
can be created without unnecessary attention to node's unwanted
failures. This commit also adds a minimal set of assertions.
2022-10-14 15:45:24 +08:00
yyforyongyu
89d275169a
lntemp: add nodeManager to manage running nodes
This commit adds a new struct, `nodeManager`, to manage running nodes.
It keeps track of the running nodes, and manages the start and stop of
the nodes with the context of `HarnessTest`.
2022-10-14 15:45:23 +08:00
yyforyongyu
ea1336ae2a
lntemp: add HarnessMiner to manage miner related functions 2022-10-14 15:45:23 +08:00
yyforyongyu
00b143eac8
lntemp: add utils and fee service
This commit adds several helper functions and a fee service. Note that
the fee service is identical to what's inside `lntest`. Once the
migration is done, the old file will be removed.
2022-10-14 15:45:23 +08:00
yyforyongyu
d32539ab86
lntemp: add HarnessNode to manage lnd's process
This commit adds a new struct, `HarnessNode`, to manage the lnd process
used in our itest. This struct is built upon `HarnessRPC`, `State`, and
`NodeWatcher`.
2022-10-14 15:45:23 +08:00
yyforyongyu
cd5ab844e2
lntest: export flag logoutput
This commit temporarily exports the flag `logoutput` so it can be used
by `lntemp`.
2022-10-14 07:25:29 +08:00
yyforyongyu
cf0e0820d6
lntemp: introduce SyncMap to store type information
This commit replaces the usage of `sync.Map` with the new struct
`SyncMap` to explicitly express the type info used in the map.
2022-10-14 07:25:29 +08:00
yyforyongyu
30ebacb888
lntemp/node: add node topology watcher
This commit adds a new struct, `nodeWatcher`, to keep track of all graph
topology updates of a given node, including updates from channel edges,
policies, and peers.
2022-10-14 07:25:29 +08:00
yyforyongyu
f8dcebb637
lntemp/node: introduce node state
This commit adds a new package `lntemp/node` and inside it a new struct
`State` is added to track the internal node state. This enables us using
the same running nodes accross tests without wrong uncleaned states.
2022-10-14 07:25:29 +08:00
yyforyongyu
d5abecbba9
lntemp/rpc: add new package lntemp/rpc to manage rpc clients
This commit starts the construction of the new package `lntemp`. This
package serves as the scaffolding while we migrate our old itest into
the new one. Once the migration is finished, the package will be put
back to `lntest`.
2022-10-14 07:25:29 +08:00
yyforyongyu
55f8a621ae
lntest+github: add flag temptest to run tests separately
This commit adds a new flag `temptest` so we can run new and old tests
separately. This flag will be removed once the migration from old tests
to new tests is finished.
2022-10-14 07:25:28 +08:00
Oliver Gugger
2e410dd248
Merge pull request #7029 from MStreet3/bug/blockcache-test-data-race
blockcache: fix datarace in blockcache_test
2022-10-13 20:10:07 +02:00
Michael Street
a51e1ae931
docs: add release notes 2022-10-13 10:33:09 -04:00
Michael Street
46444d9154
blockcache: fix datarace in blockcache_test
mockChainBackend simulates a chain backend and
tracks the number of calls via a private property
called chainCallCount.  This commit uses a write
mutex instead of read mutex in the call to GetBlock,
adds a getter method to access chainCallCount
with a read mutex and uses a write mutex in
resetChainCallCount.
2022-10-13 10:32:27 -04:00
Oliver Gugger
d2d3cf3408
Merge pull request #6956 from ellemouton/configureChanReserve
multi: configurable remote chan reserve
2022-10-13 15:39:40 +02:00
Oliver Gugger
d55f861107
Merge pull request #6928 from ellemouton/wtclientMemPerf
multi: remove AckedUpdates & CommittedUpdates from ClientSession struct
2022-10-13 15:34:35 +02:00
Oliver Gugger
c2d89bd9f5
Merge pull request #7032 from guggero/autopilot-test-fix
autopilot: fix loop variables, use require
2022-10-13 15:31:31 +02:00
Elle Mouton
e6eed56827
docs: update release notes for #6928 2022-10-13 14:42:51 +02:00