lnwallet+peer: extract close types to separate pkg
The aux close types will soon be used by a different package that would otherwise cause an import cycle if used directly from lnwallet/chancloser. We now create a new sub-package lnwallet/types that will be improrted from all users of these types.
This commit is contained in:
5 files changed
+106
-91
No files matched your search
+3
-2
@@ -69,6 +69,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chancloser"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/types"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/macaroons"
|
||||
"github.com/lightningnetwork/lnd/onionmessage"
|
||||
@@ -3060,7 +3061,7 @@ func createRPCCloseUpdate(
|
||||
|
||||
err := fn.MapOptionZ(
|
||||
u.LocalCloseOutput,
|
||||
func(closeOut chancloser.CloseOutput) error {
|
||||
func(closeOut types.CloseOutput) error {
|
||||
cr, err := closeOut.ShutdownRecords.Serialize()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error serializing "+
|
||||
@@ -3085,7 +3086,7 @@ func createRPCCloseUpdate(
|
||||
|
||||
err = fn.MapOptionZ(
|
||||
u.RemoteCloseOutput,
|
||||
func(closeOut chancloser.CloseOutput) error {
|
||||
func(closeOut types.CloseOutput) error {
|
||||
cr, err := closeOut.ShutdownRecords.Serialize()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error serializing "+
|
||||
|
||||
Reference in new issue
Block a user