lnwallet/btcwallet: add compile time check for BlockChainIO interface

This commit is contained in:
Johan T. Halseth
2018-08-24 15:30:23 +02:00
parent c4415f0400
commit beb5d14ed9
4 changed files with 9 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/btcsuite/btcd/wire"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/lnwallet"
)
var (
@@ -237,6 +238,8 @@ func (m *MockNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
type mockChainIO struct{}
var _ lnwallet.BlockChainIO = (*mockChainIO)(nil)
func (m *mockChainIO) GetBestBlock() (*chainhash.Hash, int32, error) {
return nil, mockChainIOHeight, nil
}