multi: move Input interface and related code

This commit is a step to split the lnwallet package. It puts the Input
interface and implementations in a separate package along with all their
dependencies from lnwallet.
This commit is contained in:
Joost Jager
2019-01-16 15:47:43 +01:00
parent 667474db75
commit 9e012ecc93
66 changed files with 811 additions and 689 deletions

View File

@@ -25,6 +25,7 @@ import (
"github.com/lightningnetwork/lnd/chainntnfs/neutrinonotify"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwallet/btcwallet"
@@ -63,14 +64,14 @@ const (
// TODO(halseth): make configurable at startup?
var defaultBtcChannelConstraints = channeldb.ChannelConstraints{
DustLimit: lnwallet.DefaultDustLimit(),
MaxAcceptedHtlcs: lnwallet.MaxHTLCNumber / 2,
MaxAcceptedHtlcs: input.MaxHTLCNumber / 2,
}
// defaultLtcChannelConstraints is the default set of channel constraints that are
// meant to be used when initially funding a Litecoin channel.
var defaultLtcChannelConstraints = channeldb.ChannelConstraints{
DustLimit: defaultLitecoinDustLimit,
MaxAcceptedHtlcs: lnwallet.MaxHTLCNumber / 2,
MaxAcceptedHtlcs: input.MaxHTLCNumber / 2,
}
// chainCode is an enum-like structure for keeping track of the chains
@@ -105,7 +106,7 @@ type chainControl struct {
feeEstimator lnwallet.FeeEstimator
signer lnwallet.Signer
signer input.Signer
keyRing keychain.KeyRing