multi: move mockChainIO, mockNotifier to lntest/mock

This commit is contained in:
eugene
2020-08-27 15:34:55 -04:00
parent 3fa5d042c9
commit c7cbacc35b
18 changed files with 241 additions and 308 deletions

View File

@ -20,6 +20,7 @@ import (
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/lntest/mock"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/sweep"
)
@ -398,7 +399,7 @@ func TestBabyOutputSerialization(t *testing.T) {
type nurseryTestContext struct {
nursery *utxoNursery
notifier *sweep.MockNotifier
chainIO *mockChainIO
chainIO *mock.ChainIO
publishChan chan wire.MsgTx
store *nurseryStoreInterceptor
restart func() bool
@ -441,8 +442,8 @@ func createNurseryTestContext(t *testing.T,
timeoutChan := make(chan chan time.Time)
chainIO := &mockChainIO{
bestHeight: 0,
chainIO := &mock.ChainIO{
BestHeight: 0,
}
sweeper := newMockSweeper(t)
@ -522,7 +523,7 @@ func createNurseryTestContext(t *testing.T,
func (ctx *nurseryTestContext) notifyEpoch(height int32) {
ctx.t.Helper()
ctx.chainIO.bestHeight = height
ctx.chainIO.BestHeight = height
ctx.notifier.NotifyEpoch(height)
}