diff --git a/lnwallet/channel.go b/lnwallet/channel.go index 974ddd7c..16dfae8f 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -3120,6 +3120,8 @@ func (lc *LightningChannel) ReceiveHTLCSettle(preimage [32]byte, logIndex uint64 // entry which will remove the target log entry within the next commitment // update. This method is intended to be called in order to cancel in // _incoming_ HTLC. +// +// TODO(roasbeef): add value as well? func (lc *LightningChannel) FailHTLC(rHash [32]byte) (uint64, error) { lc.Lock() defer lc.Unlock() diff --git a/lnwallet/channel_test.go b/lnwallet/channel_test.go index 7e17c5b1..534abddb 100644 --- a/lnwallet/channel_test.go +++ b/lnwallet/channel_test.go @@ -133,6 +133,8 @@ func (m *mockNotfier) Stop() error { func (m *mockNotfier) RegisterSpendNtfn(outpoint *wire.OutPoint, heightHint uint32) (*chainntnfs.SpendEvent, error) { return &chainntnfs.SpendEvent{ Spend: make(chan *chainntnfs.SpendDetail), + Cancel: func() { + }, }, nil } @@ -330,11 +332,6 @@ func createTestChannels(revocationWindow int) (*LightningChannel, *LightningChan Db: dbBob, } - cleanUpFunc := func() { - os.RemoveAll(bobPath) - os.RemoveAll(alicePath) - } - aliceSigner := &mockSigner{aliceKeyPriv} bobSigner := &mockSigner{bobKeyPriv} @@ -351,6 +348,14 @@ func createTestChannels(revocationWindow int) (*LightningChannel, *LightningChan return nil, nil, nil, err } + cleanUpFunc := func() { + os.RemoveAll(bobPath) + os.RemoveAll(alicePath) + + channelAlice.Stop() + channelBob.Stop() + } + // Now that the channel are open, simulate the start of a session by // having Alice and Bob extend their revocation windows to each other. err = initRevocationWindows(channelAlice, channelBob, revocationWindow)