lnwallet/btcwallet: add compile-time interface assertions for Signer+BlockChainIO

This commit is contained in:
Olaoluwa Osuntokun 2016-12-22 12:53:20 -08:00
parent 000c334e63
commit b49d2827a2
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
3 changed files with 10 additions and 0 deletions

@ -3,6 +3,7 @@ package btcwallet
import (
"encoding/hex"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/roasbeef/btcd/wire"
)
@ -73,3 +74,7 @@ func (b *BtcWallet) GetBlockHash(blockHeight int64) (*wire.ShaHash, error) {
return blockHash, nil
}
// A compile time check to ensure that BtcWallet implements the BlockChainIO
// interface.
var _ lnwallet.WalletController = (*BtcWallet)(nil)

@ -199,3 +199,7 @@ func (b *BtcWallet) ComputeInputScript(tx *wire.MsgTx,
return inputScript, nil
}
// A compile time check to ensure that BtcWallet implements the Signer
// interface.
var _ lnwallet.Signer = (*BtcWallet)(nil)

1
routing/fibonacci.go Normal file

@ -0,0 +1 @@
package routing