mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 06:21:40 +01:00
lnwallet: store aux sig in custom data within the HTLC
We can use this space as we'll properly encode the blinded paths data along with our custom fields before we go to write the HTLCs to the wire.
This commit is contained in:
parent
115bad5c5c
commit
6a8da1cd80
2 changed files with 12 additions and 0 deletions
|
@ -125,6 +125,10 @@ func NewAuxVerifyJob(sig fn.Option[tlv.Blob], keyRing CommitmentKeyRing,
|
|||
}
|
||||
}
|
||||
|
||||
// htlcCustomSigType is the TLV type that is used to encode the custom HTLC
|
||||
// signatures within the custom data for an existing HTLC.
|
||||
var htlcCustomSigType tlv.TlvType65543
|
||||
|
||||
// AuxSigner is an interface that is used to sign and verify HTLCs for custom
|
||||
// channels. It is similar to the existing SigPool, but uses opaque blobs to
|
||||
// shuffle around signature information and other metadata.
|
||||
|
|
|
@ -5496,6 +5496,14 @@ func genHtlcSigValidationJobs(chanState *channeldb.OpenChannel,
|
|||
localCommitmentView.customBlob, auxLeaf,
|
||||
)
|
||||
|
||||
// As this HTLC has a custom sign associated with it,
|
||||
// store in the custom records map so we can write to
|
||||
// disk later.
|
||||
sigType := htlcCustomSigType.TypeVal()
|
||||
htlc.CustomRecords[uint64(sigType)] = auxSig.UnwrapOr(
|
||||
nil,
|
||||
)
|
||||
|
||||
auxVerifyJobs = append(auxVerifyJobs, auxVerifyJob)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue