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
2019-05-23 20:48:36 -07:00
parent 440ae7818a
commit 25fc464a6e
2 changed files with 40 additions and 0 deletions

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 {