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

This commit is contained in:
Olaoluwa Osuntokun committed 2016-12-27 16:43:31 -08:00
1 parent 000c334e63
commit b49d2827a2
3 files changed
+10

No files matched your search

+5
View File
@@ -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)
+4
View File
@@ -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
View File
@@ -0,0 +1 @@
package routing