channeldb+migration: export commonly used methods

This commit exports several commonly used methods that can be used by
later migrations. It also adds a channel commit deserializer.
This commit is contained in:
yyforyongyu committed 2022-04-20 01:18:12 +08:00
1 parent 22f8f6ed4a
commit 8b289e79f5
7 files changed
+109 -20

No files matched your search

@@ -203,7 +203,7 @@ func TestMigrateOptionalChannelCloseSummaryFields(t *testing.T) {
}
var chanPointBuf bytes.Buffer
err = writeOutpoint(&chanPointBuf, &chanState.FundingOutpoint)
err = WriteOutpoint(&chanPointBuf, &chanState.FundingOutpoint)
if err != nil {
t.Fatalf("unable to write outpoint: %v", err)
}
@@ -303,7 +303,7 @@ func TestMigrateOptionalChannelCloseSummaryFields(t *testing.T) {
t.Fatal(err)
}
err = writeChanConfig(&buf, &cs.LocalChanConfig)
err = WriteChanConfig(&buf, &cs.LocalChanConfig)
if err != nil {
t.Fatal(err)
}
@@ -354,7 +354,7 @@ func TestMigrateOptionalChannelCloseSummaryFields(t *testing.T) {
t.Fatal(err)
}
err = writeChanConfig(&buf, &cs.LocalChanConfig)
err = WriteChanConfig(&buf, &cs.LocalChanConfig)
if err != nil {
t.Fatal(err)
}