htlcswitch+peer: add flush api and lifecycle hooks to ChannelUpdateHandler

We also add dummy implementations to channelLink and various mocks.
This commit is contained in:
Keagan McClelland
2023-11-21 14:20:53 -07:00
parent ec5b824879
commit 9b2d1018f2
7 changed files with 318 additions and 3 deletions

View File

@@ -907,6 +907,25 @@ func (f *mockChannelLink) UpdateShortChanID() (lnwire.ShortChannelID, error) {
return f.shortChanID, nil
}
func (f *mockChannelLink) EnableAdds(linkDirection LinkDirection) error {
// TODO(proofofkeags): Implement
return nil
}
func (f *mockChannelLink) DisableAdds(linkDirection LinkDirection) error {
// TODO(proofofkeags): Implement
return nil
}
func (f *mockChannelLink) IsFlushing(linkDirection LinkDirection) bool {
// TODO(proofofkeags): Implement
return false
}
func (f *mockChannelLink) OnFlushedOnce(func()) {
// TODO(proofofkeags): Implement
}
func (f *mockChannelLink) OnCommitOnce(LinkDirection, func()) {
// TODO(proofofkeags): Implement
}
var _ ChannelLink = (*mockChannelLink)(nil)
func newDB() (*channeldb.DB, func(), error) {