Merge pull request #1508 from wpaulino/dust-limit-active-chain
fundingmanager: determine our dust limit based on active chain
This commit is contained in:
commit
11e7f47f01
@ -2504,11 +2504,19 @@ func (f *fundingManager) handleInitFundingMsg(msg *initFundingMsg) {
|
|||||||
localAmt = msg.localFundingAmt
|
localAmt = msg.localFundingAmt
|
||||||
remoteAmt = msg.remoteFundingAmt
|
remoteAmt = msg.remoteFundingAmt
|
||||||
capacity = localAmt + remoteAmt
|
capacity = localAmt + remoteAmt
|
||||||
ourDustLimit = lnwallet.DefaultDustLimit()
|
|
||||||
minHtlc = msg.minHtlc
|
minHtlc = msg.minHtlc
|
||||||
remoteCsvDelay = msg.remoteCsvDelay
|
remoteCsvDelay = msg.remoteCsvDelay
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// We'll determine our dust limit depending on which chain is active.
|
||||||
|
var ourDustLimit btcutil.Amount
|
||||||
|
switch registeredChains.PrimaryChain() {
|
||||||
|
case bitcoinChain:
|
||||||
|
ourDustLimit = lnwallet.DefaultDustLimit()
|
||||||
|
case litecoinChain:
|
||||||
|
ourDustLimit = defaultLitecoinDustLimit
|
||||||
|
}
|
||||||
|
|
||||||
fndgLog.Infof("Initiating fundingRequest(localAmt=%v, remoteAmt=%v, "+
|
fndgLog.Infof("Initiating fundingRequest(localAmt=%v, remoteAmt=%v, "+
|
||||||
"capacity=%v, chainhash=%v, addr=%v, dustLimit=%v)", localAmt,
|
"capacity=%v, chainhash=%v, addr=%v, dustLimit=%v)", localAmt,
|
||||||
msg.pushAmt, capacity, msg.chainHash, msg.peerAddress.Address,
|
msg.pushAmt, capacity, msg.chainHash, msg.peerAddress.Address,
|
||||||
|
Loading…
Reference in New Issue
Block a user