rpc+contractcourt: merge the contractResolver state into the pendingchannels RPC response #1227
Labels
beginner
Issues suitable for new developers
channel management
The management of the nodes channels
contracts
P3
might get fixed, nice to have
rpc
Related to the RPC interface
Currently, the
pendingchannels
RPC will only display information drawn from theutxoNursery
for pending force close channels. However, for a channel that was forced closed with active HTLCs, the HTLC outputs won't be sent to the nursery until they're fully mature. As a result, atm, there's a gap where all information isn't displayed on the RPC layer. This should be reconciled by having thependingchannels
RPC query thechainArbitrator
to obtain information regarding all activecontractResolvers
for a particular channel point.There are currently four types of
contractResolvers
: timeout, success, timeout contest, and success contest. The first two are terminal states and will result in outputs being swept on chain by theutxoNursery
or the resolver directly. The latter two, are indeterminate states. In this state we're either waiting for an HTLC to timeout, a pre-image to be discovered off-chain, or a pre-image to be discovered on-chain. During this period of time (before expiry or sweeping), there's no information available on the RPC layer concerning these HTLCs. In order to reconcile this, we'll need to extend thependingchannels
RPC call to also pull in information concerning these HTLCs.One possible path would be to extend the
HTLC
with a new enum showing the current status of the HTLC itself.The text was updated successfully, but these errors were encountered: