lnwallet: export AnchorSize
This commit is contained in:
6 files changed
+16
-16
No files matched your search
+4
-4
@@ -7694,7 +7694,7 @@ func NewAnchorResolution(chanState *channeldb.OpenChannel,
|
||||
WitnessScript: anchorWitnessScript,
|
||||
Output: &wire.TxOut{
|
||||
PkScript: localAnchor.PkScript(),
|
||||
Value: int64(anchorSize),
|
||||
Value: int64(AnchorSize),
|
||||
},
|
||||
HashType: sweepSigHash(chanState.ChanType),
|
||||
}
|
||||
@@ -7706,7 +7706,7 @@ func NewAnchorResolution(chanState *channeldb.OpenChannel,
|
||||
|
||||
//nolint:lll
|
||||
signDesc.PrevOutputFetcher = txscript.NewCannedPrevOutputFetcher(
|
||||
localAnchor.PkScript(), int64(anchorSize),
|
||||
localAnchor.PkScript(), int64(AnchorSize),
|
||||
)
|
||||
|
||||
// For anchor outputs with taproot channels, the key desc is
|
||||
@@ -8249,7 +8249,7 @@ func (lc *LightningChannel) LocalBalanceDust() bool {
|
||||
// regain the stats allocated to the anchor outputs with the co-op
|
||||
// close transaction.
|
||||
if chanState.ChanType.HasAnchors() && chanState.IsInitiator {
|
||||
localBalance += 2 * anchorSize
|
||||
localBalance += 2 * AnchorSize
|
||||
}
|
||||
|
||||
return localBalance <= chanState.LocalChanCfg.DustLimit
|
||||
@@ -8269,7 +8269,7 @@ func (lc *LightningChannel) RemoteBalanceDust() bool {
|
||||
// regain the stats allocated to the anchor outputs with the co-op
|
||||
// close transaction.
|
||||
if chanState.ChanType.HasAnchors() && !chanState.IsInitiator {
|
||||
remoteBalance += 2 * anchorSize
|
||||
remoteBalance += 2 * AnchorSize
|
||||
}
|
||||
|
||||
return remoteBalance <= chanState.RemoteChanCfg.DustLimit
|
||||
|
||||
Reference in new issue
Block a user