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.
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.
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.
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.
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.
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.
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`.
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.
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`.
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.
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.
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`.
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.
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.