Commit Graph

758 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
e0dc10b1a5
Merge pull request #824 from cfromknecht/multi-chain-coin-type
Configurable CoinType for HD Derivation
2018-03-13 18:14:30 -07:00
Olaoluwa Osuntokun
0befe41384
Merge pull request #782 from paddyquinn/master
funding: implement reservation zombie sweeper
2018-03-13 17:07:53 -07:00
Conner Fromknecht
ca7992e8dd
lnwallet/btcwallet/singer: use chainKeyScope to fetch scoped mgr 2018-03-13 16:33:46 -07:00
Conner Fromknecht
fbef815530
lnwallet/btcwallet/config: add CoinType to configuration 2018-03-13 16:33:46 -07:00
Conner Fromknecht
e760963ead
lnwallet/btcwallet/btcwallet: use coin type in key scope 2018-03-13 16:33:46 -07:00
Conner Fromknecht
e99243d86b
lnwallet/interface_test: inti btcwallet with test coin type 2018-03-13 16:33:46 -07:00
PaddyQuinn
5410725306 lnwallet: update comments 2018-03-12 19:37:18 -04:00
Conner Fromknecht
600ab9d149
lnwallet/interface_test: extend publish timeout
This commit extends the amount of time we wait
for transaction to enter the mempool from
10 to 30 seconds. The wallet's interface tests
seem to be particularly slow when run with the
race flag, a problem which is only exacerbated
by the slowness of travis.

With 10s and the race flag, I was able to repro
the issues locally fairly consistently.
2018-03-12 13:52:16 -07:00
Conner Fromknecht
5df8b52dae
multi: set initiator funding txn 2018-03-11 15:06:22 -07:00
Conner Fromknecht
2e1dcd316c
lnwallet/wallet: store funding txn during reservation 2018-03-11 13:58:41 -07:00
Olaoluwa Osuntokun
800eea931f
build+multi: switch from bolt to bbolt
In this commit, we switch from boltbd/bolt to coreos/bbolt as the
former is no longer being actively maintained.
2018-03-10 19:01:13 -08:00
Conner Fromknecht
5539e23b05
lnwallet/channel_test: convert tests to new channel API for persistence 2018-03-09 17:35:54 -08:00
Conner Fromknecht
d420266911
lnwallet/channel: expose API changes to channel state transitions 2018-03-09 17:35:53 -08:00
Conner Fromknecht
6e542d5dfa
lnwallet/channel_test: init open channels with Packager 2018-03-09 14:45:30 -08:00
Conner Fromknecht
53e4422a2e
lnwallet/channel: integrate fwdpkgs w/ in-mem buffering 2018-03-09 14:45:30 -08:00
Olaoluwa Osuntokun
b8d0df998a
lnwallet: when validating fee updates, ensure newFee < balance 2018-03-08 12:50:49 -05:00
Olaoluwa Osuntokun
ac90a8288e
lnwallet: precalculate fees in mSAT to avoid multiple conversions 2018-03-08 12:50:49 -05:00
Olaoluwa Osuntokun
217166fb10
lnwallet: within validateCommitmentSanity check for balance underflow
In this commit, we add an additional check within
validateCommitmentSanity due to the recent change to unsigned integers
for peer balances in the channel state machine. If after evaluation
(just applying HTLC updates), the balances are negative, then we’ll
return ErrBelowChanReserve.
2018-03-08 12:50:48 -05:00
Olaoluwa Osuntokun
5f5e4554cb
lnwallet: if the initiator is unable to pay fees, then consume their entire output
In this commit, we add logic to account for an edge case in the
protocol. If they initiator if unable to pay the fees for a commitment,
then their *entire* output is meant to go to fees. The recent change to
properly interpret balances as unsigned integers (within the protocol)
let to the discovery of this missed edge case.
2018-03-08 12:50:48 -05:00
Olaoluwa Osuntokun
19bc477b9a
lnwallet: update interface tests to account for recent lnwire.MilliSatoshi change
lnwire.MilliSatoshi is now a signed integer, as a result, we’ll return
a different error if our balances go to negative due to the inability
to pay a the set fee.
2018-03-08 12:50:48 -05:00
Olaoluwa Osuntokun
8425a35684
lnwallet: in NewChannelReservation ensure commit fees are payable
In this commit, we fix a bug introduced by the recent change of
lnwire.MilliSatoshi to be an unsigned integer. After this change an
integer underflow was left undetected, as a result we’ll now
momentarily cast to a signed integer in order to ensure that both sides
can pay the proper fee.
2018-03-08 12:50:47 -05:00
Olaoluwa Osuntokun
5ecef17e0f
lnwallet: modify logging to display mSAT amount if funding constrains invalid 2018-03-08 12:50:47 -05:00
Olaoluwa Osuntokun
116406c7ec
Merge pull request #769 from Roasbeef/new-lightning-key-derivation
multi: modify key derivation to be fully deterministic, remove p2pkh, wallet now witness only
2018-03-06 17:21:55 -05:00
Olaoluwa Osuntokun
18e9475a9a
lnwallet/btcwallet: grab best header timestamp directly from wallet
In this commit, we modify the way we obtain the current best header
timestamp. In doing this, we fix an intermittent flake that would pop
up at times on the integration tests. This could occur as if the wallet
was lagging behind the chain backend for a re-org, then a hash that the
backend knew of, may not be known by the wallet.

To remedy this, we’ll take advantage of a recent change to btcwallet to
actually include the timestamp in its sync state.
2018-03-06 16:04:07 -05:00
Olaoluwa Osuntokun
d98e7a730d
lnwallet: update integration tests due to recent API changes 2018-03-06 16:04:06 -05:00
Olaoluwa Osuntokun
a144018e98
lnwallet: remove p2pkh as an address type, wallet is now pure segwit
In this commit, we modify the mechanics of the wallet to only allow
derivation of segwit-like addresses. Additionally, the ConfirmedBalance
method on the WalletController now only has a single argument, as it’s
assumed that the wallet is itself only concerned with segwit outputs.
2018-03-06 16:04:03 -05:00
Olaoluwa Osuntokun
0d1a40fb46
lnwallet: update tests due to recent API changes 2018-03-06 16:04:03 -05:00
Olaoluwa Osuntokun
5b063a0691
lnwallet: modify the way we derive revocation roots to be deterministic
In this commit, we modify the way we generate the secrets for
revocation roots to be fully deterministic. Rather than use a special
key and derive all sub-roots from that (mixing in some “salts”), we’ll
use the proper keychain.KeyFamily instead. This ensures that given a
static description of the channel, we’re able to re-derive our
revocation root properly.
2018-03-06 16:04:02 -05:00
Olaoluwa Osuntokun
a41f00e2d6
lnwallet: update funding flow to utilize keychain.KeyRing
In this commit, we modify the funding flow process to obtain all keys
necessary from the keychain.KeyRing interface. This ensure that all
keys we generate are fully deterministic.
2018-03-06 16:04:02 -05:00
Olaoluwa Osuntokun
fe12c908f8
lnwallet: add an instance of keychain.SecretKeyRing to the Config struct 2018-03-06 16:04:02 -05:00
Olaoluwa Osuntokun
22ee0a7576
lnwallet: update state machine due to channeldb and SignDescriptor changes 2018-03-06 16:04:02 -05:00
Olaoluwa Osuntokun
af1fd65655
lnwallet/btcwallet: update Signer implementation to use keychain.KeyDescriptor 2018-03-06 16:04:01 -05:00
Olaoluwa Osuntokun
a0dc06b954
lnwallet: update script_utils and tests due to SignDescriptor API change 2018-03-06 16:04:01 -05:00
Olaoluwa Osuntokun
73dd1536ed
lnwallet: update signdescriptor_test.go due to latest API changes 2018-03-06 16:04:00 -05:00
Olaoluwa Osuntokun
9ccdcaf747
lnwallet: update the SignDescriptor struct to use keychain.KeyDescriptor
In this commit, we update the SignDescriptor struct to instead use the
keychain.KeyDescriptor struct inplace of a raw public key. We do this
as this allows for a recovery mode, where the caller doesn’t know what
key was used exactly, but remembers the precise KeyDescriptor. A
stateless signer is still able to re-derive the proper key, as it’s
given the full path.
2018-03-06 16:04:00 -05:00
Olaoluwa Osuntokun
93280ad60a
lnwallet/btcwallet: update implementation to account for recent API changes
The new version of the internal core of btcwallet now uses KeyScopes
rather than address types to derive particular addresses. As a result,
in this commit, we update our API usage to ensure that proper addresses
are still derived.
2018-03-06 16:04:00 -05:00
Olaoluwa Osuntokun
6290a520fd
lnwallet/btcwallet: remove pruned interface methods
These methods are no longer a part of the interface. As a result, we
can safely delete them.
2018-03-06 16:04:00 -05:00
Olaoluwa Osuntokun
a26367f3cb
lnwallet: remove NewRawKey and FetchRootKey from the WalletController interface
In this commit, we remove two methods from the WalletController
interface which were previously used by the funding reservation process
(NewRawKey) and the p2p network (FetchRootKey) in order to derive
various keys for operation. This methods are no longer necessary as the
KeyRing interface implements the functionality in a deterministic
manner.
2018-03-06 16:03:59 -05:00
Johan T. Halseth
781c2a6eb4
lnwallet test: update test to new error message 2018-03-06 22:02:35 +01:00
Johan T. Halseth
0cbb759d0a
lnwallet: send ReservationError for invalid/incompatible reservation 2018-03-06 22:02:34 +01:00
Johan T. Halseth
bb63ad7da6
lnwallet: send ReservationError for unacceptable constraints 2018-03-06 22:02:34 +01:00
Johan T. Halseth
2cd7ec0833
lnwallet: add errors.go, errors sent to peer during funding 2018-03-06 22:02:34 +01:00
Olaoluwa Osuntokun
d8ce90306d
lnwallet/btcwallet: during initial creation catch the case of an existing wallet
In this commit, due to the recent changes within lnd itself, it may be
possible that a wallet already exists when the wallet has been signaled
to be created. As a result, *always* open the wallet ourselves, but
allow an existing wallet to already be in place.
2018-03-05 11:07:07 -05:00
Johan T. Halseth
dd6872da31
lnwallet test: add TestFeeRateTypes and TestStaticFeeEstimator 2018-02-26 22:42:27 +01:00
Johan T. Halseth
d7834ca4eb
lnwallet tests: update tests to new FeeEstimator and fee rate types 2018-02-26 22:42:25 +01:00
Johan T. Halseth
1f839d2526
lnwallet/channel: denominate in fee rate types 2018-02-26 22:42:25 +01:00
Johan T. Halseth
e1bb762cf7
lnwallet: denominate in fee rate types 2018-02-26 22:42:25 +01:00
Johan T. Halseth
088d9bc42f
lnwallet: add VSize method for returning size from TxWeightEstimator 2018-02-26 22:42:24 +01:00
Johan T. Halseth
f6ac5658e2
lnwallet: make SendOutputs take feerate in SatPerVByte 2018-02-26 22:42:24 +01:00
Johan T. Halseth
68557e43c1
lnwallet: add feerate types, make estimator return sat/vbyte 2018-02-26 22:42:24 +01:00
Conner Fromknecht
4449038ae5
lnwallet/btcwallet/btcwallet: adds extra double spend case
Adds an extra case to the select statement to catch
an error produced by btcd. The error is meant to signal
that an output was previously spent, which can appear
under certain race conditions in spending/broadcasting.
This caused our final itest to fail because it would
not try to recraft the justice txn.
2018-02-20 20:48:53 -08:00
Olaoluwa Osuntokun
34efb380be
lnwallet: update interface tests due to recent API change 2018-02-20 19:16:14 -08:00
Olaoluwa Osuntokun
d5923f3832
Merge pull request #594 from halseth/publish-transaction-error-codes
Ignore ErrRejectDuplicate errors
2018-02-20 19:05:53 -08:00
Jason Dufair
84551c616f lnwallet/lnrpc: Expose sync status to gRPC interface
This commit adds wallet_best_block_timestamp to the gRPC interface.
This is done in order to allow clients to calculate progress while
lnd syncs to the blockchain. wallet_best_block_timestamp is exposed
via the GetInfo() rpc call. Additionally, IsSynced() returns the
WalletBestBlockTimestamp as the second value in the tuple
that is returned, providing additional detail when querying about the
status of the sync. The BtcWallet interface has also been updated
accordingly.

This commit was created to support the issue to
[Add progress bar for chain sync] (lightninglabs/lightning-app#10) in
lightning-app
2018-02-20 19:00:06 -08:00
Johan T. Halseth
3fd7f28b39
lnwallet: don't ignore any returned error from PublishTransaction 2018-02-14 12:34:41 +01:00
Johan T. Halseth
d96b5b62eb
lnwallet test: add test for PublishTransaction return errors 2018-02-14 12:34:41 +01:00
Johan T. Halseth
1dcc89cca9
lnwallet/btcwallet: return concrete error type from PublishTransaction 2018-02-14 12:34:40 +01:00
Johan T. Halseth
a1a9834a53
lnwallet: add PublishTransaction error types 2018-02-14 12:34:40 +01:00
Olaoluwa Osuntokun
7f61d8cf3d
lnwallet: update tests to use latest neutrino API 2018-02-09 12:16:17 -08:00
Johan T. Halseth
82dc8e0794
lnwallet test: add channel constraints tests
This commit adds the tests TestMaxAcceptedHTLCs,
TestMaxPendingAmount, TestChanReserve and TestMinHTLC.
2018-02-08 18:35:25 -05:00
Johan T. Halseth
f9701cde63
lnwallet tests: set channel reserve during channel tests 2018-02-08 18:35:25 -05:00
Johan T. Halseth
7b9f098fe6
lnwallet: fully validate all channel constraints in validateCommitmentSanity
This commit introduces changes to the validateCommitmentSanity
function to fully validate all channel constraints.
validateCommitmentSanity now validates that the
MaxPendingAmount, ChanReserve, MinHTLC, & MaxAcceptedHTLCs
limits are all adhered to during the lifetime of a channel.

When applying a set of updates, the channel constraints are
validated from the point-of-view of either the local or the
remote node, to make sure the updates will be accepted.

Co-authored-by: nsa <elzeigel@gmail.com>
2018-02-08 18:35:25 -05:00
Johan T. Halseth
1873fe1381
lnwallet/channel: move common calculation of balance into computeView
This commit moves common logic used to calculate the state
of a commitment after applying a set of HTLC updates, into
the new method computeView. This method can be used when
calculating the available balance, validating the sanity
of a commitment after applying a set of updates, and also
when creating a new commitment, reducing the duplication
of this logic.
2018-02-08 18:35:25 -05:00
Johan T. Halseth
98d28611e4
lnwallet/channel: let evaluateHTLCView take mutate boolean
This commit adds a new boolean parameter mutateState to
evalueteHTLCView, that let us call it without neccessarily
mutating the addHeight/removeHeight of the HTLCs, which is
useful when evaluating the commitment validity without
mutating the state.
2018-02-08 18:35:25 -05:00
Johan T. Halseth
50f495fae1
lnwallet: cleanup of reservation.CommitConstraints, and move RemoteChanConstraints.
This commit adds some more comments and checks to
reservation.CommitConstraints, including making
MinHTLC value one of the passed constraints.

RemoteChanConstraints is also moved out of
reservation.
2018-02-08 18:35:24 -05:00
nsa
7e7516137d
lnwallet: validate commited channel constraints 2018-02-08 18:35:23 -05:00
Olaoluwa Osuntokun
9c483c38b1
lnwallet: update state machine to use new lnwire.Sig everywhere 2018-02-06 20:14:31 -08:00
Daniel McNally
8543497dcc multi: fixing it's/its typos in comments 2018-02-06 19:13:07 -08:00
practicalswift
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
MeshCollider
4b1cc98808 multi: apply roasbeef diff to support incoming socks.ProxiedAddr 2018-02-05 17:37:46 -08:00
Olaoluwa Osuntokun
18741831dd
Merge pull request #485 from halseth/fix-negative-balance
Use remoteACKed index when calculating availableBalance.
2018-02-05 16:23:17 -08:00
Olaoluwa Osuntokun
cfacc18f72
Merge pull request #711 from Roasbeef/funding-fail-first
funding: during funding error fail before sending Error to peer
2018-02-05 15:09:21 -08:00
Johan T. Halseth
9f2ec87ed6
lnwallet/sigpool: exit SubmitSignBatch on quit 2018-02-02 21:16:38 -05:00
Johan T. Halseth
f83f47541d
channel test: add TestDesyncHTLCs
This commit adds a test that trigger a case where the balance
could end up being negative when we used the logIndex when
calculating the channel's available balance. This could
happen when the logs got out of sync, and we would use
the balance from a settled HTLC even though we wouldn't
include it when signing the next state.
2018-02-02 21:16:37 -05:00
Johan T. Halseth
83b368d20e
lnwallet/channel: use remoteACKedIndex instead of logIndex in
availableBalance
2018-02-02 21:16:37 -05:00
Olaoluwa Osuntokun
609525f0e8
Merge pull request #712 from Roasbeef/avoid-dust-change-funding
lnwallet: avoid creating dust change outputs in funding txns
2018-02-01 16:20:52 -08:00
Olaoluwa Osuntokun
20098e8cb3
lnwallet: update transactions_test.go due to recent API changes 2018-01-31 14:31:14 -08:00
Jim Posen
916b83a6ee lnwallet: Implement test vectors from BOLT 03, Appendix C.
Appendix C of BOLT 03 contains a series of test vectors asserting that
commitment, HTLC success, and HTLC timeout transactions are created
correctly. Here the test cases are transcribed to Go structs and
verified.

We also break out some logic need to tests that bypass the constructor
and remove some redundant fields.
2018-01-31 14:30:56 -08:00
Olaoluwa Osuntokun
43fa9fe467
lnwallet: avoid creating dust change outputs in funding txns
Before this commit, if the remaining change was small enough, then it
was possible for us to generate a non-std funding transaction. This is
an issue as the txn would fail to propagate, meaning funds could
potentially be stuck in limbo if users didn't manually drop their
transaction history.

To avoid this scenario, we won't create a change output that is dusty.
Instead, we'll add these as miner fees.

Fixes #690.
2018-01-31 14:10:45 -08:00
Olaoluwa Osuntokun
246c05fcd8
lnwallet: add additional debug logging for txns during funding flows 2018-01-31 14:00:05 -08:00
Olaoluwa Osuntokun
1819abf224
lnwallet: increase size of test reservation due to high funding limit 2018-01-28 16:55:11 -08:00
Olaoluwa Osuntokun
3036fc0181 lnwallet: disallow creation of channels < 2x dust limit
Fixes #633.
2018-01-28 15:11:13 -08:00
Olaoluwa Osuntokun
63fe8aec5b
lnwallet: properly use in KB, not KiB to convert to sat/byte for bitcoind estimator
In this commit, we fix an existing bug. The fee estimation within
bitcoind is based on fee/KB (1000), not fee/KiB (1024).

Pointed out by @dabura667.
2018-01-28 14:53:58 -08:00
Olaoluwa Osuntokun
f85f1f97ca
lnwallet: add the second level witness script to the HtlcRetribution
In this commit, we add the second level witness script to the
HtlcRetribution struct. We do this as it’s possible that we when
attempt to sweep funds after a channel breach, then the remote party
has already gone to the second layer. In this case, we’ll then need to
update our SignDesc and also the witness, in order to do that we need
this script that’ll get us pass the second layer P2WSH check.
2018-01-22 19:19:58 -08:00
Olaoluwa Osuntokun
967a9ca7de
lnwallet: add new HtlcSecondLevelRevoke witness type
In this commit, we add a new witness type to the set of known types.
This new type will be used when we need to sweep an HTLC that the
remote party has taken to the second level.
2018-01-22 19:19:57 -08:00
Olaoluwa Osuntokun
109e42a567
lnwallet: update OfferedHtlcSuccessWitnessSize to factor in preimage size 2018-01-22 19:19:57 -08:00
Olaoluwa Osuntokun
cca0d64ea4
lnwallet: add size estimates for second level HTLC script+spends 2018-01-22 19:19:56 -08:00
Olaoluwa Osuntokun
783f01e1c7
multi: fix linter warnings 2018-01-22 19:19:56 -08:00
Olaoluwa Osuntokun
1604c75a9c
lnwallet: modify CreateCloseProposal to also return the close txid and local balance 2018-01-22 19:19:53 -08:00
Olaoluwa Osuntokun
5bbe126c34
lnwallet: add new NewUnilateralCloseSummary function
In this commit, we add a new function that allows a caller to create a
UnilateralCloseSummary with the proper materials. This will be used
within a new sub-system to be added in a later commit to properly
dispatch notifications when on-chain events happen for a channel.
2018-01-22 19:19:47 -08:00
Olaoluwa Osuntokun
341c1678fc
lnwallet: publicly export NewBreachRetribution 2018-01-22 19:19:47 -08:00
Olaoluwa Osuntokun
30c4196f91
lnwallet: remove the closeObserver from the channel state machine
In this PR, we entirely remove the closeObserver from the channel state
machine. It was added very early on before most of the other aspects of
the daemon were built out. This goroutine was responsible for
dispatching notifications to outside parties if the commitment
transaction was spent at all. This had several issues, since it was
linked to the *lifetime* of the channel state machine itself. As a
result of this linkage, we had to do weird stuff like hand off in
memory pointers to the state machine in order to ensure notifications
were properly dispatched.
2018-01-22 19:19:47 -08:00
Olaoluwa Osuntokun
b396d438bb
lnwallet: add new TestChannelUnilateralCloseHtlcResolution test case
In this commit, we add a new test case for unilateral channel closes to
ensure that if the remote party closes the commitment on-chain. Then
we’re able to sweep both incoming and outgoing HTLC’s from their
commitment. With this tests, we ensure that the values returned for
HtlcResolutions from the UnilateralCloseSummary are correct and allow
us to sweep all funds properly.
2018-01-22 19:19:33 -08:00
Olaoluwa Osuntokun
f9d5656d17
lnwallet: update unit tests to be aware of new channel API changes 2018-01-22 19:19:33 -08:00
Olaoluwa Osuntokun
d35709b38e
lnwallet: extend TestForceClose to close with both incoming+outgoing HTLCs
In this commit we add some additional scenarios to the TestForceClose
test. With this expanded test case, we now ensure the the party that
force closes is able to properly sweep both incoming and outgoing
HTLC’s fully with the information contained the HtlcResolution struct.
2018-01-22 19:19:33 -08:00
Olaoluwa Osuntokun
1d7a1ac0ee
lnwallet: update channel state machine tests to use distinct keys
In this commit, we update the channel state machine tests to use a new
key for each purpose. Before this commit, the same key would be used
the entire time. As a result, a few bugs slipped by that would’ve been
detected if we used fresh keys for each purpose. Additionally, this
reflect the real world case as we always use distinct keys for each
purpose to avoid key re-use.
2018-01-22 19:19:32 -08:00
Olaoluwa Osuntokun
b5496c52a2
lnwallet: newHtlcResolution now returns both incoming and outgoing HTLC resolutions
In this commit, we’ve added a new HtlcResolutions struct to house both
the incoming and outgoing HTLC resolutions. This struct will now be
coupled with the object that returns when we detect that a commitment
transaction was closed on chain. For incoming HTLC’s, we’ll check the
preimage cache to see if we can claim the HTLC on-chain. If we can,
then we’ll copy of the preimage, and make a proper incoming HTLC
resolution.
2018-01-22 19:19:32 -08:00
Olaoluwa Osuntokun
d98026f579
lnwallet: modify OutgoingHtlcResolution to also account for remote force closes
In this commit, we modify the OutgoingHtlcResolution struct to detect
if this is the remote party’s commitment transaction or not. With this
change, we’ll now be able to properly time out an HTLC that was
detected on the commitment transaction of the remote peer.
Additionally, we now populate the CsvDelay (if local commitment) and
the ClaimOutpoint (as we may be sweeping directly from the commitment
transaction now.
2018-01-22 19:19:32 -08:00
Olaoluwa Osuntokun
bcfe7192d7
lnwallet: add new IncomingHtlcResolution for resolving incoming HTLC's on-chain
In this commit, we add a new IncomingHtlcResolution struct. This is the
opposite of the existing OutgoingHtlcResolution struct. The items in
this new struct allow callers to sweep an incoming HTLC that we know
the preimage to. These will always be created when a commitment goes
on-chain. However, if we know the preimage, then that will be populated
in place of all zeroes in the Preimage field.
2018-01-22 19:19:31 -08:00
Olaoluwa Osuntokun
ecf6d758a2
lnwallet: add distinct CommitOutputResolution for resolving commit outputs on-chain
In this commit, we modify both the ForceCloseSummary, and the
UnilateralClosureSummary to return the items needed to sweep the
commitment output distinctly. By doing this, it’s now possible to pass
a dedicated struct to a sub-system in order to allow it to sweep a
commitment output. As the maturity delay is a part of this new struct,
this tells the caller if this was on the local commitment (CSV
required) or on the remote commitment (no CSV required).
2018-01-22 19:19:31 -08:00