This PR closes #184.
The problem lies in this code block of the decode.go file in the zpay32 package of lnd:
if !strings.HasPrefix(hrp[2:], expectedPrefix) {
return nil, fmt.Errorf(
"invoice not for current active network '%s'", net.Name)
}
Submitting an uppercase Bolt11 invoice sets the condition to always be false and triggers that error.
The associated commit in this pull request enforces the lowercase conversion of the invoice before all the processing take place, thereby eliminating the problem at its root.
I have tested it using go test, and the issue does not arise when hardcoding an uppercase invoice in service_test.go
This PR closes #184.
The problem lies in this code block of the
decode.go
file in thezpay32
package oflnd
:Submitting an uppercase Bolt11 invoice sets the condition to always be false and triggers that error.
The associated commit in this pull request enforces the lowercase conversion of the invoice before all the processing take place, thereby eliminating the problem at its root.
I have tested it using
go test
, and the issue does not arise when hardcoding an uppercase invoice inservice_test.go