htlcswitch: expose custom records on intercepted packet

This commit is contained in:
Joost Jager
2020-06-24 12:03:00 +02:00
parent 363142de33
commit 2903505164
9 changed files with 216 additions and 165 deletions

View File

@@ -4,6 +4,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/htlcswitch/hop"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/record"
)
// htlcPacket is a wrapper around htlc lnwire update, which adds additional
@@ -91,6 +92,10 @@ type htlcPacket struct {
// will be extraced from the hop payload recevived by the incoming
// link.
outgoingTimeout uint32
// customRecords are user-defined records in the custom type range that
// were included in the payload.
customRecords record.CustomSet
}
// inKey returns the circuit key used to identify the incoming htlc.