htlcswitch/test: do not string match error

This commit is contained in:
Joost Jager 2019-11-11 15:35:23 +01:00
parent 3b22540fc1
commit de33010e90
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

@ -1248,8 +1248,14 @@ func TestChannelLinkMultiHopUnknownNextHop(t *testing.T) {
totalTimelock).Wait(30 * time.Second)
if err == nil {
t.Fatal("error haven't been received")
} else if err.Error() != lnwire.CodeUnknownNextPeer.String() {
t.Fatalf("wrong error have been received: %v", err)
}
fErr, ok := err.(*ForwardingError)
if !ok {
t.Fatalf("expected ForwardingError")
}
if _, ok = fErr.FailureMessage.(*lnwire.FailUnknownNextPeer); !ok {
t.Fatalf("wrong error has been received: %T",
fErr.FailureMessage)
}
// Wait for Alice to receive the revocation.