htlcswitch: convert blinded failures for blinded payments

This commit is contained in:
Carla Kirk-Cohen
2024-04-08 15:51:15 -04:00
parent de9c9c028c
commit 43687181f7
2 changed files with 117 additions and 7 deletions

View File

@@ -39,6 +39,12 @@ const (
EncrypterTypeRelaying = 4
)
// IsBlinded returns a boolean indicating whether the error encrypter belongs
// to a blinded route.
func (e EncrypterType) IsBlinded() bool {
return e == EncrypterTypeIntroduction || e == EncrypterTypeRelaying
}
// ErrorEncrypterExtracter defines a function signature that extracts an
// ErrorEncrypter from an sphinx OnionPacket.
type ErrorEncrypterExtracter func(*btcec.PublicKey) (ErrorEncrypter,