Skip to content

Commit

Permalink
chainntnfs: Test dcrw and remotewallet drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusd committed Jul 8, 2020
1 parent 83e8f0d commit 6030cde
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion chainntnfs/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"github.com/decred/dcrd/wire"
"github.com/decred/dcrlnd/chainntnfs"
"github.com/decred/dcrlnd/chainntnfs/dcrdnotify"
"github.com/decred/dcrlnd/chainntnfs/dcrwnotify"
"github.com/decred/dcrlnd/chainntnfs/remotedcrwnotify"
"github.com/decred/dcrlnd/channeldb"
"github.com/decred/dcrlnd/compat"
"github.com/decred/dcrlnd/internal/testutils"
Expand Down Expand Up @@ -1980,6 +1982,27 @@ func TestInterfaces(t *testing.T) {
if err != nil {
t.Fatalf("error initializing dcrd notifier: %v", err)
}

case "dcrw":
w, teardown := testutils.NewSyncingTestWallet(t, &backend)
notifier, err = dcrwnotify.New(
w, compat.Params3to2(chainntnfs.NetParams), hintCache, hintCache,
)
if err != nil {
t.Fatalf("error initializing dcrw notifier: %v", err)
}
tearDownNotifier = teardown

case "remotedcrw":
c, teardown := testutils.NewTestRemoteDcrwallet(t, &backend)
notifier, err = remotedcrwnotify.New(
c, compat.Params3to2(chainntnfs.NetParams), hintCache, hintCache,
)
if err != nil {
t.Fatalf("error initializing dcrw notifier: %v", err)
}
tearDownNotifier = teardown

default:
t.Fatalf("unknown notifier type: %v", notifierType)
}
Expand Down Expand Up @@ -2010,7 +2033,6 @@ func TestInterfaces(t *testing.T) {
notifierType := notifierDriver.NotifierType

success := t.Run(notifierType, func(t *testing.T) {

miner, vw, tearDownMiner := newMiner(t, notifierType)
defer tearDownMiner()

Expand Down

0 comments on commit 6030cde

Please sign in to comment.