From 1f3124f48a0af43492b5aecf1bf9a1d0d5371634 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 30 Jan 2018 20:31:25 -0800 Subject: [PATCH] routing: use [33]byte instead of *btcutil.Publickey for SendToSwitch With this change, we can avoid unnecessarily serializing a public key. --- routing/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routing/router.go b/routing/router.go index 4e92ff15..beba40ad 100644 --- a/routing/router.go +++ b/routing/router.go @@ -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