Commit Graph

56 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
702f214972
utxonursery: update inner loop to use new ChainNotifier API
Within the inner loop of the utxoNursery when waiting for a new
sweepable transaction to be confirmed, we now use the new ChainNotifier
API for ConfirmationEvent’s which exposes additional details as to
exactly where in the chain the transaction was ultimately confirmed.
2016-12-27 16:44:00 -08:00
Olaoluwa Osuntokun
343cd7779f
utxonursery: use a two value read from the epoch chan for graceful shutdown
Within the utoxNursery we now use a two value read fro the block epoch
channel in order to exit early if/when the ChainNotifier begins the
shutdown process before the signal reaches the utxoNursery.
2016-12-27 16:13:41 -08:00
Olaoluwa Osuntokun
a5d9ce2fac
utxonursery: remove contract breach retribution duties
This commit removes the previously added contract breach retribution
duties from the utxoNursery. Much of the code removed will instead be
moved to a new sub-system which continuously monitors the state of ALL
active contracts for their entire life time.
2016-11-28 16:53:23 -08:00
Olaoluwa Osuntokun
a29cd563f6
utxonursery: expand duties to channel contract breach retribution
This commit expands the duties of the utxoNursery (which should maybe
be renamed), to handle carrying out retribution against a counter-party
who breaches the channel contract by broadcasting a prior revoked state
on-chain.

As part of the retribution, once the breach transaction (the revoked
commitment transaction) has been confirmed within a block, the nursery
then sweep ALL funds pending within the channel to the daemon’s wallet.

This new section of the code has been implemented without full
persistence logic similar to time-locked output sweeping workflow of
the nursery. In a later commit, this section will gain full persistence
logic so the workflows can survive restarts of the daemon.
2016-11-21 13:28:56 -06:00
Olaoluwa Osuntokun
7b953c9c61
rpcserver: add REST workarounds, implement new RPC calls
This commit adds a few workarounds in order to concurrently support the
REST proxy as well as the regular gRPC interface. Additionally,
concrete support for the following RPC calls has been added:
GetTransactions, SubscriptTransactions, SubscribeInvoices, and
NewWitnessAddress.
2016-10-15 14:42:25 -07:00
Olaoluwa Osuntokun
bfa2a1d698
lnd: introduce the utxoNursery which incubates outputs until maturity
This commit introduces the utxoNursery. The duty of the utxoNursery is
to watch over CSV-locked immature outputs until they’ve fully matured.
An output is mature once both its sequence lock indicated by the CSV op
code within its output has become active. Once an output is mature the
nursery sweeps the outputs in batches into the source wallet.

The utxoNursery executes its duties once a commitment transaction has
been broadcast on-chain.
2016-09-12 19:07:39 -07:00