From 1dace1fed491fb1956a8f6df0acbe30fc593167c Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 1 May 2018 16:30:12 -0700 Subject: [PATCH] htlcswitch/mock: impl UpdateShortChanID w/ error --- htlcswitch/mock.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/htlcswitch/mock.go b/htlcswitch/mock.go index 33e3e1a9..a8c20b69 100644 --- a/htlcswitch/mock.go +++ b/htlcswitch/mock.go @@ -627,13 +627,17 @@ func (f *mockChannelLink) Start() error { return nil } -func (f *mockChannelLink) ChanID() lnwire.ChannelID { return f.chanID } -func (f *mockChannelLink) ShortChanID() lnwire.ShortChannelID { return f.shortChanID } -func (f *mockChannelLink) UpdateShortChanID(sid lnwire.ShortChannelID) { f.shortChanID = sid } -func (f *mockChannelLink) Bandwidth() lnwire.MilliSatoshi { return 99999999 } -func (f *mockChannelLink) Peer() Peer { return f.peer } -func (f *mockChannelLink) Stop() {} -func (f *mockChannelLink) EligibleToForward() bool { return f.eligible } +func (f *mockChannelLink) ChanID() lnwire.ChannelID { return f.chanID } +func (f *mockChannelLink) ShortChanID() lnwire.ShortChannelID { return f.shortChanID } +func (f *mockChannelLink) Bandwidth() lnwire.MilliSatoshi { return 99999999 } +func (f *mockChannelLink) Peer() Peer { return f.peer } +func (f *mockChannelLink) Stop() {} +func (f *mockChannelLink) EligibleToForward() bool { return f.eligible } +func (f *mockChannelLink) setLiveShortChanID(sid lnwire.ShortChannelID) { f.shortChanID = sid } +func (f *mockChannelLink) UpdateShortChanID() (lnwire.ShortChannelID, error) { + f.eligible = true + return f.shortChanID, nil +} var _ ChannelLink = (*mockChannelLink)(nil)