mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-17 08:12:29 +01:00
lnmock: let MockChain also implement lnwallet.BlockChainIO
Note that a compile-time assertion was not added as this leads to an import cycle.
This commit is contained in:
@@ -74,6 +74,18 @@ func (m *MockChain) GetBlockHeader(hash *chainhash.Hash) (
|
|||||||
return args.Get(0).(*wire.BlockHeader), args.Error(1)
|
return args.Get(0).(*wire.BlockHeader), args.Error(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *MockChain) GetUtxo(op *wire.OutPoint, pkScript []byte,
|
||||||
|
heightHint uint32, cancel <-chan struct{}) (*wire.TxOut, error) {
|
||||||
|
|
||||||
|
args := m.Called(op, pkScript, heightHint, cancel)
|
||||||
|
|
||||||
|
if args.Get(0) == nil {
|
||||||
|
return nil, args.Error(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
return args.Get(0).(*wire.TxOut), args.Error(1)
|
||||||
|
}
|
||||||
|
|
||||||
func (m *MockChain) IsCurrent() bool {
|
func (m *MockChain) IsCurrent() bool {
|
||||||
args := m.Called()
|
args := m.Called()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user