Skip to content

Commit

Permalink
Allow invoices with flag 151 (electrum's optional trampoline routing)
Browse files Browse the repository at this point in the history
  • Loading branch information
lnproxy authored Jun 23, 2023
1 parent 3585246 commit 8b0f7d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lnproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@ func (ms *MaybeString) UnmarshalJSON(data []byte) error {
}

func Wrap(r RelayParameters, x ProxyParameters, p DecodedInvoice) (*InvoiceParameters, uint64, error) {
for flag, feature := range p.Features {
for flag, _ := range p.Features {
switch flag {
case "8", "9", "14", "15", "16", "17", "25", "48", "49", "149":
case "8", "9", "14", "15", "16", "17", "25", "48", "49", "149", "151":
// 25 is route blinding
// 48/49 is payment metadata
// 148/149 is trampoline routing
// 150/151 is electrum's trampoline
default:
log.Printf("unhandled feature flag: %s\n\t%v\n", flag, feature)
log.Printf("unhandled feature flag: %s\n", x.Invoice)
return nil, 0, fmt.Errorf("unknown feature flag: %s", flag)
}
}
Expand Down

0 comments on commit 8b0f7d1

Please sign in to comment.