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:
Elle Mouton 2025-02-07 15:27:41 +02:00
parent 8f37699db3
commit c354fd8f70
No known key found for this signature in database
GPG Key ID: D7D916376026F177

View File

@ -74,6 +74,18 @@ func (m *MockChain) GetBlockHeader(hash *chainhash.Hash) (
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 {
args := m.Called()