1
0
mirror of https://github.com/ACINQ/eclair.git synced 2024-11-20 10:39:19 +01:00

Merge branch 'wip-bolts' of https://github.com/ACINQ/eclair into wip-bolts

This commit is contained in:
sstone 2017-01-30 18:28:52 +01:00
commit 686789b389

View File

@ -113,7 +113,7 @@ object Sphinx {
* - packet is the next packet, to be forwarded to address
*/
def parsePacket(privateKey: PrivateKey, associatedData: BinaryData, packet: BinaryData): (BinaryData, BinaryData, BinaryData) = {
require(packet.length == 1254, "onion packet length should be 1854")
require(packet.length == 1254, "onion packet length should be 1254")
val header = Header.read(packet)
val perHopPayload = packet.drop(854)
val sharedSecret = computeSharedSecret(PublicKey(header.publicKey), privateKey)