multi: update to fn v2
This commit is contained in:
167 files changed
+372
-302
No files matched your search
+1
-1
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/btcsuite/btcd/txscript"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/go-errors/errors"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
"github.com/lightningnetwork/lnd/kvdb/etcd"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
"github.com/btcsuite/btcd/txscript"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
||||
@@ -270,7 +270,7 @@ func (h *HarnessTest) AssertNumActiveEdges(hn *node.HarnessNode,
|
||||
IncludeUnannounced: includeUnannounced,
|
||||
}
|
||||
resp := hn.RPC.DescribeGraph(req)
|
||||
activeEdges := fn.Filter(filterDisabled, resp.Edges)
|
||||
activeEdges := fn.Filter(resp.Edges, filterDisabled)
|
||||
total := len(activeEdges)
|
||||
|
||||
if total-old == expected {
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/btcsuite/btcd/integration/rpctest"
|
||||
"github.com/btcsuite/btcd/rpcclient"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
"github.com/lightningnetwork/lnd/lntest/node"
|
||||
"github.com/lightningnetwork/lnd/lntest/wait"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -296,10 +296,7 @@ func (h *HarnessMiner) AssertTxInMempool(txid chainhash.Hash) *wire.MsgTx {
|
||||
return fmt.Errorf("empty mempool")
|
||||
}
|
||||
|
||||
isEqual := func(memTx chainhash.Hash) bool {
|
||||
return memTx == txid
|
||||
}
|
||||
result := fn.Find(isEqual, mempool)
|
||||
result := fn.Find(mempool, fn.Eq(txid))
|
||||
|
||||
if result.IsNone() {
|
||||
return fmt.Errorf("txid %v not found in "+
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
base "github.com/btcsuite/btcwallet/wallet"
|
||||
"github.com/btcsuite/btcwallet/wallet/txauthor"
|
||||
"github.com/btcsuite/btcwallet/wtxmgr"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
|
||||
"github.com/lightningnetwork/lnd/lntest/rpc"
|
||||
@@ -324,11 +324,11 @@ func (s *State) updateEdgeStats() {
|
||||
|
||||
req := &lnrpc.ChannelGraphRequest{IncludeUnannounced: true}
|
||||
resp := s.rpc.DescribeGraph(req)
|
||||
s.Edge.Total = len(fn.Filter(filterDisabled, resp.Edges))
|
||||
s.Edge.Total = len(fn.Filter(resp.Edges, filterDisabled))
|
||||
|
||||
req = &lnrpc.ChannelGraphRequest{IncludeUnannounced: false}
|
||||
resp = s.rpc.DescribeGraph(req)
|
||||
s.Edge.Public = len(fn.Filter(filterDisabled, resp.Edges))
|
||||
s.Edge.Public = len(fn.Filter(resp.Edges, filterDisabled))
|
||||
}
|
||||
|
||||
// updateWalletBalance creates stats for the node's wallet balance.
|
||||
|
||||
Reference in new issue
Block a user