Skip to content

Commit c354fd8

Browse files
committed
lnmock: let MockChain also implement lnwallet.BlockChainIO
Note that a compile-time assertion was not added as this leads to an import cycle.
1 parent 8f37699 commit c354fd8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lnmock/chain.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ func (m *MockChain) GetBlockHeader(hash *chainhash.Hash) (
7474
return args.Get(0).(*wire.BlockHeader), args.Error(1)
7575
}
7676

77+
func (m *MockChain) GetUtxo(op *wire.OutPoint, pkScript []byte,
78+
heightHint uint32, cancel <-chan struct{}) (*wire.TxOut, error) {
79+
80+
args := m.Called(op, pkScript, heightHint, cancel)
81+
82+
if args.Get(0) == nil {
83+
return nil, args.Error(1)
84+
}
85+
86+
return args.Get(0).(*wire.TxOut), args.Error(1)
87+
}
88+
7789
func (m *MockChain) IsCurrent() bool {
7890
args := m.Called()
7991

0 commit comments

Comments
 (0)