multi: move mockChainIO, mockNotifier to lntest/mock
This commit is contained in:
1 parent
3fa5d042c9
commit
c7cbacc35b
18 files changed
+241
-308
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package mock
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
)
|
||||
|
||||
// ChainIO is a mock implementation of the BlockChainIO interface.
|
||||
type ChainIO struct {
|
||||
BestHeight int32
|
||||
}
|
||||
|
||||
// GetBestBlock currently returns dummy values.
|
||||
func (c *ChainIO) GetBestBlock() (*chainhash.Hash, int32, error) {
|
||||
return chaincfg.TestNet3Params.GenesisHash, c.BestHeight, nil
|
||||
}
|
||||
|
||||
// GetUtxo currently returns dummy values.
|
||||
func (c *ChainIO) GetUtxo(op *wire.OutPoint, _ []byte,
|
||||
heightHint uint32, _ <-chan struct{}) (*wire.TxOut, error) {
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// GetBlockHash currently returns dummy values.
|
||||
func (c *ChainIO) GetBlockHash(blockHeight int64) (*chainhash.Hash, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// GetBlock currently returns dummy values.
|
||||
func (c *ChainIO) GetBlock(blockHash *chainhash.Hash) (*wire.MsgBlock, error) {
|
||||
return nil, nil
|
||||
}
|
||||
Reference in new issue
Block a user