mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
multi: move mockChainIO, mockNotifier to lntest/mock
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/channeldb/kvdb"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/lntest/mock"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
@@ -80,7 +81,7 @@ func TestHtlcOutgoingResolverRemoteClaim(t *testing.T) {
|
||||
|
||||
spendHash := spendTx.TxHash()
|
||||
|
||||
ctx.notifier.spendChan <- &chainntnfs.SpendDetail{
|
||||
ctx.notifier.SpendChan <- &chainntnfs.SpendDetail{
|
||||
SpendingTx: spendTx,
|
||||
SpenderTxHash: &spendHash,
|
||||
}
|
||||
@@ -114,7 +115,7 @@ type resolveResult struct {
|
||||
|
||||
type outgoingResolverTestContext struct {
|
||||
resolver *htlcOutgoingContestResolver
|
||||
notifier *mockNotifier
|
||||
notifier *mock.ChainNotifier
|
||||
preimageDB *mockWitnessBeacon
|
||||
resolverResultChan chan resolveResult
|
||||
resolutionChan chan ResolutionMsg
|
||||
@@ -122,10 +123,10 @@ type outgoingResolverTestContext struct {
|
||||
}
|
||||
|
||||
func newOutgoingResolverTestContext(t *testing.T) *outgoingResolverTestContext {
|
||||
notifier := &mockNotifier{
|
||||
epochChan: make(chan *chainntnfs.BlockEpoch),
|
||||
spendChan: make(chan *chainntnfs.SpendDetail),
|
||||
confChan: make(chan *chainntnfs.TxConfirmation),
|
||||
notifier := &mock.ChainNotifier{
|
||||
EpochChan: make(chan *chainntnfs.BlockEpoch),
|
||||
SpendChan: make(chan *chainntnfs.SpendDetail),
|
||||
ConfChan: make(chan *chainntnfs.TxConfirmation),
|
||||
}
|
||||
|
||||
checkPointChan := make(chan struct{}, 1)
|
||||
@@ -212,7 +213,7 @@ func (i *outgoingResolverTestContext) resolve() {
|
||||
}
|
||||
|
||||
func (i *outgoingResolverTestContext) notifyEpoch(height int32) {
|
||||
i.notifier.epochChan <- &chainntnfs.BlockEpoch{
|
||||
i.notifier.EpochChan <- &chainntnfs.BlockEpoch{
|
||||
Height: height,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user