routing: handle onion errors in ChannelRouter

This commit is contained in:
John Griffith
2017-09-08 12:39:24 +02:00
committed by Olaoluwa Osuntokun
parent 54c4fc4559
commit 1057a1a7c3
2 changed files with 45 additions and 3 deletions

View File

@@ -2,7 +2,6 @@ package routing
import (
"bytes"
"errors"
"fmt"
"image/color"
"testing"
@@ -180,7 +179,7 @@ func TestSendPaymentRouteFailureFallback(t *testing.T) {
_ *lnwire.UpdateAddHTLC, _ *sphinx.Circuit) ([32]byte, error) {
if ctx.aliases["luoji"].IsEqual(n) {
return [32]byte{}, errors.New("send error")
return [32]byte{}, &lnwire.FailChannelDisabled{}
}
return preImage, nil