multi: move all channelstate operations to ChannelStateDB

This commit is contained in:
Andras Banki-Horvath authored and Oliver Gugger committed 2021-09-29 17:00:03 +02:00
1 parent ddea833d31
commit 11cf4216e4
35 files changed
+377 -238

No files matched your search

+2 -2
View File
@@ -58,7 +58,7 @@ func copyChannelState(state *channeldb.OpenChannel) (
*channeldb.OpenChannel, func(), error) {
// Make a copy of the DB.
dbFile := filepath.Join(state.Db.Path(), "channel.db")
dbFile := filepath.Join(state.Db.GetParentDB().Path(), "channel.db")
tempDbPath, err := ioutil.TempDir("", "past-state")
if err != nil {
return nil, nil, err
@@ -81,7 +81,7 @@ func copyChannelState(state *channeldb.OpenChannel) (
return nil, nil, err
}
chans, err := newDb.FetchAllChannels()
chans, err := newDb.ChannelStateDB().FetchAllChannels()
if err != nil {
cleanup()
return nil, nil, err