During the integration tests we might want to shut down a trader client
through the admin RPC. If that closes the shutdown channel on a package
global interceptor, that means we can't start another trader client
during that test. We need to make sure we can pass in an interceptor for
each trader instance.
With lnd 0.15.0 almost out of the door, it is reasonable for us to ask
users to be on the latest 0.14.x version.
We use the walletrpc.SignPsbt method in Pool which was added in 0.14.2.
Fixes#372.
This commit fixes the issue that if the lnd node the trader client is
connected to was also restored from seed, it is starting at account key
derivation index 0. So when recovering accounts we need to make sure we
re-derive the right number of keys from the wallet in order to allow
properly creating new accounts with the recovered node.
The rpcserver cannot have more than one account recovery process running
at once. The server uses a internal attribute (`recoveryPending`) that
is set to true when a new recovery process starts. However, that
attribute was only set to false if the process ended successfully,
leaving the server unable to try more recoveries after a failure.
To fix an accidental market segregation for lnd 0.14.x users that didn't
set an explicit channel type in their bid orders, we roll back the
changes from #330.
We can re-enable this default value selection once a large number of ask
orders support the new channel type.
Thaw height is now absoulte (used to be relative). We could check the
channel type (for type SCRIPT_ENFORCED_LEASE is always absolute) but
we can simply follow the "500,000" value rule.
A new variable for the connected lnd node's version was added but was
not given a value when run in subserver mode within LiT.
This commit uses the lnd service's cached version directly and removes
the uninitialized variable.
The Marshaler interface is used to transform internal types to
decorated RPC ones.
It decouples that functionality form the rpcServer so it is easier to
test exhaustively.
The auctioneer will now provide a height hint along with every proposed
batch it sends to traders. This height hint is then used by each trader
to base off their absolute lease expiration height, such that they can
agree on the same value and avoid any divergences due to block
propagation discrepancies between them.
The `available_balance` of an account was only being populated for
`ListAccounts`. Populate the field in other operations like `deposit` or
`renew` could save the user some confusions.
Add check for requests with relative AND absolute height provided
instead of using the absolute one by default.
The same check for sats/kw and confirmation target has been moved to the
`switch` statement instead of having it in an extra `if`.
The `feeRate` variable was shadowing inside the `req.GetConfTarget() > 0`
switch case. The server was returning an error when the `feeRate` was
estimated using the confirmation target.
Generally the confirmation target is much less granular than a direct sat/byte
due to jumps in the confirmation confidence intervals. Changed the
account manager to take the `feeRate` instead of the `confTarget`. The
caller will be the one with the responsability of calculating the
`freeRate`. If the caller does not provide a value (`freeRate=0`) we
will calculate it from the default confTarget (6 blocks).
With this commit we add two new RPCs for handling sidecar tickets.
ListSidecars will show all sidecar tickets known to the local database,
including those where our node is on the receiving end of a sidecar
channel.
CancelSidecar will cancel a specific sidecar ticket. If an order was
created for it, that bid order will be canceled. Doing so will make sure
the ticket isn't executed any further.
When manually submitting an order, we want to update the state of the
ticket in the main database to the same state that we update the ticket
that's stored within the orders's TLV data.