multi: update linter, fix new issues

This commit is contained in:
Oliver Gugger
2023-05-12 10:09:56 +02:00
parent e549096b88
commit 56dba2df03
31 changed files with 263 additions and 301 deletions

View File

@@ -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.