mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-18 19:41:21 +02:00
fix off-by-one in main mix-header generation loop
* Mix info for the first hop wasn’t being calculated
This commit is contained in:
@@ -163,7 +163,7 @@ func NewMixHeader(dest LightningAddress, identifier [securityParameter]byte,
|
|||||||
|
|
||||||
// Now we compute the routing information for each hop, along with a
|
// Now we compute the routing information for each hop, along with a
|
||||||
// MAC of the routing info using the shared key for that hop.
|
// MAC of the routing info using the shared key for that hop.
|
||||||
for i := numHops - 2; i > 0; i-- {
|
for i := numHops - 2; i >= 0; i-- {
|
||||||
// The next hop from the point of view of the current hop. Node
|
// The next hop from the point of view of the current hop. Node
|
||||||
// ID's are currently the hash160 of a node's pubKey serialized
|
// ID's are currently the hash160 of a node's pubKey serialized
|
||||||
// in compressed format.
|
// in compressed format.
|
||||||
|
Reference in New Issue
Block a user