htlcswitch: create error obfuscator with wrapped type for blinded

Create our error encrypter with a wrapped type if we have a blinding
point present. Doing this in the iterator allows us to track this
information when we have both pieces of information available to us,
compared to trying to handle this later down the line:
- Downstream link on failure: we know that we've set a blinding point
  for out outgoing HTLC, but not whether we're introduction or not
- Upstream link on failure: once the failure packet has been sent
  through the switch, we no longer know whether we were the introduction
  point (without looking it up / examining our payload again /
  propagating this information through the switch).
This commit is contained in:
Carla Kirk-Cohen
2024-04-23 12:33:04 -04:00
parent 9f038c6191
commit 72260adddb
3 changed files with 77 additions and 25 deletions

View File

@@ -341,7 +341,7 @@ func (r *mockHopIterator) ExtraOnionBlob() []byte {
}
func (r *mockHopIterator) ExtractErrorEncrypter(
extracter hop.ErrorEncrypterExtracter) (hop.ErrorEncrypter,
extracter hop.ErrorEncrypterExtracter, _ bool) (hop.ErrorEncrypter,
lnwire.FailCode) {
return extracter(nil)