routing: use [33]byte instead of *btcutil.Publickey for SendToSwitch

With this change, we can avoid unnecessarily serializing a public key.
This commit is contained in:
Olaoluwa Osuntokun 2018-01-30 20:31:25 -08:00
parent 22951cb364
commit 1f3124f48a
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -130,7 +130,7 @@ type Config struct {
// forward a fully encoded payment to the first hop in the route
// denoted by its public key. A non-nil error is to be returned if the
// payment was unsuccessful.
SendToSwitch func(firstHop *btcec.PublicKey, htlcAdd *lnwire.UpdateAddHTLC,
SendToSwitch func(firstHop [33]byte, htlcAdd *lnwire.UpdateAddHTLC,
circuit *sphinx.Circuit) ([sha256.Size]byte, error)
// ChannelPruneExpiry is the duration used to determine if a channel