lnd.xprv/lnwallet
Johan T. Halseth 71228a6b06
lnwallet/channel: don't use commit height to determine FullySynced
This commit removes a faulty check we did to determine if the channel
commitments were fully synced. We assumed that if out local commitment
chain had a height higher than the remote, then we would have state
updates present in our chain but not in theirs, and owed a commitment.
However, there were cases where this wasn't true, and we would send a
new commitment even though we had no new updates to sign. This is a
protocol violation.

Now we don't longer check the heights to determine if we are fully
synced. A consequence of this is that we also need to check if we have
any pending fee updates that are nopt yet signed, as those are
considered non-empty updates.
2018-05-09 08:47:21 +02:00
..
btcwallet lnwallet/btcwallet/config: add recovery window and bday 2018-04-26 16:03:28 -07:00
channel_test.go lnwallet: add new test to exercise creation of unilateral close summaries for pending broadcast commitments 2018-05-03 21:29:29 -07:00
channel.go lnwallet/channel: don't use commit height to determine FullySynced 2018-05-09 08:47:21 +02:00
config.go lnwallet: add an instance of keychain.SecretKeyRing to the Config struct 2018-03-06 16:04:02 -05:00
errors.go lnwallet+funding+lnd: add new config option for min accepted channel size 2018-04-02 16:17:58 -07:00
fee_estimator_test.go lnwallet test: add TestFeeRateTypes and TestStaticFeeEstimator 2018-02-26 22:42:27 +01:00
fee_estimator.go multi: fix typos in comments 2018-04-17 19:03:27 -07:00
interface_test.go lnwallet/interfaace_test: init neutrino with chain params 2018-04-26 16:03:28 -07:00
interface.go multi: fix a-vs-an typos 2018-04-17 19:02:04 -07:00
log.go lnwallet: don't attach the rpcclient to the lnwallet logging instance 2017-08-30 20:32:37 -07:00
parameters.go fundingmanager+lnwallet: add HTLC dust limit logic 2016-12-13 11:01:57 -08:00
README.md multi: fix typos in comments 2018-04-17 19:03:27 -07:00
reservation.go lnwallet/reservation: remove RegisterMinHTLC 2018-04-06 10:02:19 +02:00
script_utils_test.go multi: fix typos in comments 2018-04-17 19:03:27 -07:00
script_utils.go multi: fix typos in comments 2018-04-17 19:03:27 -07:00
signdescriptor_test.go lnwallet: update signdescriptor_test.go due to latest API changes 2018-03-06 16:04:00 -05:00
signdescriptor.go lnwallet: update the SignDescriptor struct to use keychain.KeyDescriptor 2018-03-06 16:04:00 -05:00
sigpool.go lnwallet: add new concrete error InvalidHtlcSigError for failed htlc sig validation 2018-04-04 17:41:10 -07:00
size_test.go lnwallet: Add TxWeightEstimator support for nested pay-to-witness. 2017-10-19 17:37:53 -07:00
size.go lnwallet: add VSize method for returning size from TxWeightEstimator 2018-02-26 22:42:24 +01:00
test_utils.go lnwallet: move CreateTestChannels to new test_utils.go 2018-05-03 21:29:28 -07:00
transactions_test.go lnwallet: modify NewUnilateralCloseSummary to be aware of pending remote commits 2018-05-03 21:29:28 -07:00
txout_test.go lnwallet: move txout serialization out of lnwire 2017-09-14 13:56:25 +02:00
txout.go lnwallet: move txout serialization out of lnwire 2017-09-14 13:56:25 +02:00
wallet.go multi: fix typos in comments 2018-04-17 19:03:27 -07:00
witnessgen.go multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00

lnwallet

Build Status MIT licensed GoDoc

The lnwallet package implements an abstracted wallet controller that is able to drive channel funding workflows, a number of script utilities, witness generation functions for the various Lightning scripts, revocation key derivation, and the commitment update state machine.

The package is used within lnd as the core wallet of the daemon. The wallet itself is composed of several distinct interfaces that decouple the implementation of things like signing and blockchain access. This separation allows new WalletController implementations to be easily dropped into lnd without disrupting the code base. A series of integration tests at the interface level are also in place to ensure conformance of the implementation with the interface.

Installation and Updating

$ go get -u github.com/lightningnetwork/lnd/lnwallet