mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
b1940d6779
In this commit, we fix a long standing bug within the newly created `verifyFundingInputs` method. Before this commit, the method would attempt to derive the pkScript by looking at the last items on the witness stack, and making a p2wsh output script from that. This is incorrect as typically non of these scripts will actually be p2wsh, and instead will be p2wkh. We fix this by using the newly available `txscript.ComputePkScript` method to derive the proper pkScript. This resolves an issue w.r.t passing incorrect arguments for all backends, but an issue still stands for the neutrino backend. As is, we pass a height hint of zero into the `GetUtxo` method call. With the way the current utxo scanner is set up for neutrino, this'll cause it to never find the UTXO, as it takes the height hint as a UTXO birth height, rather than a lower bound of the birth of the UTXO. |
||
---|---|---|
.. | ||
btcwallet | ||
chainfee | ||
chanfunding | ||
chanvalidate | ||
channel_test.go | ||
channel.go | ||
commit_sort_test.go | ||
commit_sort.go | ||
config.go | ||
errors.go | ||
interface_test.go | ||
interface.go | ||
log.go | ||
parameters.go | ||
README.md | ||
reservation.go | ||
sigpool.go | ||
size_test.go | ||
test_utils.go | ||
transactions_test.go | ||
transactions.go | ||
wallet.go |
lnwallet
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