When determining the max fee rate of a channel we used to scale
the fee rate depending on our available local balance on this channel.
This lead to a special case that if a channel would be drained we
could especially decrease the fee rate even down to the fee floor.
Now we make sure that our max fee rate will not be lower than the
old fee rate to make sure in case our channel is locally drained
we do not continue to decrease fees too low.
Bitcoind will not report any fee estimation in case it has not
enough data available. We used to just set the min mempool fee
in such cases but this might not represent the current fee situation
of the bitcoin network. We return an error now so that we will use
the fallback fee instead.
In the tower session itest, we make sure to mine blocks on session count
assertion failure. This required because the session count is expected
to change only when 2 things both happen: 1) a closable session is
queued and 2) a new block notification comes through _after_ the session
has been queued. Only then will it be deleted. So we need to do this to
prevent the case where all the block notifications are consumed _before_
the session is queued for deletion. This flake tended to happen in the
windows itest.
Because we pass in the same config into multiple notifiers, we sometimes
get a data race in the unit tests. By creating a copy of the config we
avoid that.
Since we fixed a number of issues in chainntnfs.NewBitcoindBackend that
makes it compatible with bitcoind v26.0, we now want to use that
function in all our unit tests.
With the chainntnfs.NewMiner now being optimized for not creating
nodes with colliding ports, we use it in all unit tests that spin up
temporary miners.
This commit fixes a number of issues with our temporary bitcoind nodes
that we spin up for unit tests:
- We didn't remove the node's temporary data dir after tests finished.
- We used random ports which lead to unwanted port collisions.
- We used ipc:// unix sockets for ZMQ which currently isn't supported
in bitcoind v26.0 due to a regression. Since we can reliably create
new non-colliding ports now, we should use TCP for ZMQ anyway.
With this commit we create a new function that returns system wide
unique ports by using a single file to keep track of previously used
ports. We'll want to use this everywhere whenever we need to listen on a
new, random port during unit or integration tests.
Because we now have a unique source, we don't need to apply the port
offset that was used for the different tranches of parallel running
integration tests before.
To make it less confusing what version of bitcoind is actually
installed, we now require the version to be specified as a command line
argument.
Because we tag the version in the docker image tag as bitcoin-core:XX
but the binary internally is located under /opt/bitcoin-XX.Y/, we
manually set Y to 0.
In this commit, we support utilizing the usage of enviroment variables in `lnd.conf` file
for `rpcuser` and `rpcpass` fields by adding `supplyEnvValue` function in `config.go`
that returns the value of the specified environment variable, the fall-back value
if provided, or the original input string if no matching environment variables are found or set.
To avoid build caches getting larger and larger, causing our builds to
fail, we separate the caches of the different job types.
If we don't separate them, then the caches can end up being a
combination of the different jobs, which isn't useful (for example the
build cache of the cross compilation build isn't useful in an
integration test and vice versa).