mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-24 21:17:01 +01:00
chancloser: new package for cooperative channel closure
Introduces a new chancloser package which exposes a ChanCloser struct that handles the cooperative channel closure negotiation and is meant to replace chancloser.go in the lnd package. Updates all references to chancloser.go to instead use chancloser package.
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/htlcswitch"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chancloser"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
)
|
||||
|
||||
@@ -642,7 +643,7 @@ func TestChooseDeliveryScript(t *testing.T) {
|
||||
userScript: script1,
|
||||
shutdownScript: script2,
|
||||
expectedScript: nil,
|
||||
expectedError: ErrUpfrontShutdownScriptMismatch,
|
||||
expectedError: chancloser.ErrUpfrontShutdownScriptMismatch,
|
||||
},
|
||||
{
|
||||
name: "Only upfront script",
|
||||
@@ -733,7 +734,7 @@ func TestCustomShutdownScript(t *testing.T) {
|
||||
name: "Shutdown set, user script different",
|
||||
update: setShutdown,
|
||||
userCloseScript: []byte("different addr"),
|
||||
expectedError: ErrUpfrontShutdownScriptMismatch,
|
||||
expectedError: chancloser.ErrUpfrontShutdownScriptMismatch,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user