mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-08 20:03:10 +01:00
multi: update linter, fix new issues
This commit is contained in:
@@ -315,7 +315,6 @@ func testChannelBackupRestoreBasic(ht *lntest.HarnessTest) {
|
||||
"dave", nil, password, mnemonic,
|
||||
"", revocationWindow,
|
||||
backupSnapshot,
|
||||
copyPorts(oldNode),
|
||||
)
|
||||
}
|
||||
},
|
||||
@@ -347,7 +346,6 @@ func testChannelBackupRestoreBasic(ht *lntest.HarnessTest) {
|
||||
newNode := st.RestoreNodeWithSeed(
|
||||
"dave", nil, password, mnemonic,
|
||||
"", revocationWindow, nil,
|
||||
copyPorts(oldNode),
|
||||
)
|
||||
st.RestartNodeWithChanBackups(
|
||||
newNode, backupSnapshot,
|
||||
@@ -386,7 +384,6 @@ func testChannelBackupRestoreBasic(ht *lntest.HarnessTest) {
|
||||
newNode := st.RestoreNodeWithSeed(
|
||||
"dave", nil, password, mnemonic,
|
||||
"", revocationWindow, nil,
|
||||
copyPorts(oldNode),
|
||||
)
|
||||
|
||||
req := &lnrpc.RestoreChanBackupRequest{
|
||||
@@ -1367,7 +1364,7 @@ func chanRestoreViaRPC(ht *lntest.HarnessTest, password []byte,
|
||||
return func() *node.HarnessNode {
|
||||
newNode := ht.RestoreNodeWithSeed(
|
||||
"dave", nil, password, mnemonic, "", revocationWindow,
|
||||
nil, copyPorts(oldNode),
|
||||
nil,
|
||||
)
|
||||
req := &lnrpc.RestoreChanBackupRequest{Backup: backup}
|
||||
newNode.RPC.RestoreChanBackups(req)
|
||||
@@ -1376,17 +1373,6 @@ func chanRestoreViaRPC(ht *lntest.HarnessTest, password []byte,
|
||||
}
|
||||
}
|
||||
|
||||
// copyPorts returns a node option function that copies the ports of an existing
|
||||
// node over to the newly created one.
|
||||
func copyPorts(oldNode *node.HarnessNode) node.Option {
|
||||
return func(cfg *node.BaseNodeConfig) {
|
||||
cfg.P2PPort = oldNode.Cfg.P2PPort
|
||||
cfg.RPCPort = oldNode.Cfg.RPCPort
|
||||
cfg.RESTPort = oldNode.Cfg.RESTPort
|
||||
cfg.ProfilePort = oldNode.Cfg.ProfilePort
|
||||
}
|
||||
}
|
||||
|
||||
// assertTimeLockSwept when dave's outputs matures, he should claim them. This
|
||||
// function will advance 2 blocks such that all the pending closing
|
||||
// transactions would be swept in the end.
|
||||
|
||||
Reference in New Issue
Block a user