kaspad/integration/notifications_test.go
Ori Newman 8e170cf327
[NOD-1225] Rename wire to domainmessage and get rid of InvType (#853)
* [NOD-1225] Rename wire to domainmessage

* [NOD-1225] Get rid of references to package wire in the code, and get rid of InvType
2020-08-09 12:39:15 +03:00

16 lines
355 B
Go

package integration
import (
"testing"
"github.com/kaspanet/kaspad/domainmessage"
)
func setOnBlockAddedHandler(t *testing.T, harness *appHarness, handler func(header *domainmessage.BlockHeader)) {
err := harness.rpcClient.NotifyBlocks()
if err != nil {
t.Fatalf("Error from NotifyBlocks: %s", err)
}
harness.rpcClient.onBlockAdded = handler
}