diff --git a/discovery/gossiper.go b/discovery/gossiper.go index 9bb6959e5..eb13d77ea 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -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 }, diff --git a/lnutils/README.md b/lnutils/README.md new file mode 100644 index 000000000..fe2fafa7c --- /dev/null +++ b/lnutils/README.md @@ -0,0 +1,4 @@ +# `lnutils` + +This package provides fundamental types and utility functions that can be used +by all other packages. diff --git a/fn/stream.go b/lnutils/stream.go similarity index 93% rename from fn/stream.go rename to lnutils/stream.go index 9974eb467..ed04fa2ee 100644 --- a/fn/stream.go +++ b/lnutils/stream.go @@ -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.