mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 21:35:24 +01:00
multi: add lnutils
to host fundamental utility functions
We also move the `fn/stream.go` into the package `lnutils`. Eventually we will put all the [utility functions](https://github.com/lightninglabs/taro/tree/main/chanutils) into this package.
This commit is contained in:
parent
48c8c1bf48
commit
89b0e25e2c
@ -18,10 +18,10 @@ import (
|
||||
"github.com/lightningnetwork/lnd/batch"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/keychain"
|
||||
"github.com/lightningnetwork/lnd/kvdb"
|
||||
"github.com/lightningnetwork/lnd/lnpeer"
|
||||
"github.com/lightningnetwork/lnd/lnutils"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/multimutex"
|
||||
@ -1185,7 +1185,7 @@ func (d *AuthenticatedGossiper) sendBatch(annBatch []msgWithSenders,
|
||||
// skip the filter and dedup logic below, and just send the
|
||||
// announcements out to all our coonnected peers.
|
||||
if isLocal {
|
||||
msgsToSend := fn.Map(
|
||||
msgsToSend := lnutils.Map(
|
||||
annBatch, func(m msgWithSenders) lnwire.Message {
|
||||
return m.msg
|
||||
},
|
||||
|
4
lnutils/README.md
Normal file
4
lnutils/README.md
Normal file
@ -0,0 +1,4 @@
|
||||
# `lnutils`
|
||||
|
||||
This package provides fundamental types and utility functions that can be used
|
||||
by all other packages.
|
@ -1,4 +1,4 @@
|
||||
package fn
|
||||
package lnutils
|
||||
|
||||
// Map takes an input slice, and applies the function f to each element,
|
||||
// yielding a new slice.
|
Loading…
Reference in New Issue
Block a user