mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
multi: update to fn v2
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcwallet/chain"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/labels"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
@@ -145,13 +145,13 @@ type BumpRequest struct {
|
||||
func (r *BumpRequest) MaxFeeRateAllowed() (chainfee.SatPerKWeight, error) {
|
||||
// We'll want to know if we have any blobs, as we need to factor this
|
||||
// into the max fee rate for this bump request.
|
||||
hasBlobs := fn.Any(func(i input.Input) bool {
|
||||
hasBlobs := fn.Any(r.Inputs, func(i input.Input) bool {
|
||||
return fn.MapOptionZ(
|
||||
i.ResolutionBlob(), func(b tlv.Blob) bool {
|
||||
return len(b) > 0
|
||||
},
|
||||
)
|
||||
}, r.Inputs)
|
||||
})
|
||||
|
||||
sweepAddrs := [][]byte{
|
||||
r.DeliveryAddress.DeliveryAddress,
|
||||
@@ -1382,7 +1382,7 @@ func prepareSweepTx(inputs []input.Input, changePkScript lnwallet.AddrWithKey,
|
||||
return err
|
||||
}
|
||||
|
||||
extraChangeOut = extraOut.LeftToOption()
|
||||
extraChangeOut = extraOut.LeftToSome()
|
||||
|
||||
return nil
|
||||
},
|
||||
|
Reference in New Issue
Block a user