watchtower/wtdb/client_chan_summary: add ClientChanSummary

A ClientChanSummary will be inserted for each channel registered with
the client, which for now will just track the sweep pkscript to use. In
the future, this will be extended with additional information to enable
the client to efficiently compute which historical states need to be
backed up under a given policy.
This commit is contained in:
Conner Fromknecht committed 2019-05-23 20:48:36 -07:00
1 parent 440ae7818a
commit 25fc464a6e
2 files changed
+40

No files matched your search

+8
View File
@@ -153,6 +153,8 @@ func TestCodec(tt *testing.T) {
obj2 = &wtdb.BackupID{}
case *wtdb.Tower:
obj2 = &wtdb.Tower{}
case *wtdb.ClientChanSummary:
obj2 = &wtdb.ClientChanSummary{}
default:
t.Fatalf("unknown type: %T", obj)
return false
@@ -238,6 +240,12 @@ func TestCodec(tt *testing.T) {
return mainScenario(&obj)
},
},
{
name: "ClientChanSummary",
scenario: func(obj wtdb.ClientChanSummary) bool {
return mainScenario(&obj)
},
},
}
for _, test := range tests {