htlcswitch+routing+routerrpc: return error source as index

This commit is contained in:
Joost Jager committed 2019-07-11 10:37:26 +02:00
1 parent 55bef96cf3
commit 2b47632b26
11 files changed
+245 -310

No files matched your search

+2 -8
View File
@@ -163,10 +163,7 @@ func initSwitchWithDB(startingHeight uint32, db *channeldb.DB) (*Switch, error)
}
}
priv, _ := btcec.NewPrivateKey(btcec.S256())
pubkey := priv.PubKey()
cfg := Config{
SelfKey: pubkey,
DB: db,
SwitchPackager: channeldb.NewSwitchPackager(),
FwdingLog: &mockForwardingLog{
@@ -393,12 +390,9 @@ func (o *mockDeobfuscator) DecryptError(reason lnwire.OpaqueReason) (*Forwarding
return nil, err
}
priv, _ := btcec.NewPrivateKey(btcec.S256())
pubkey := priv.PubKey()
return &ForwardingError{
ErrorSource: pubkey,
FailureMessage: failure,
FailureSourceIdx: 1,
FailureMessage: failure,
}, nil
}