zpay32: remove unused method calls

The fuzz tests call inv.MinFinalCLTVExpiry() and inv.Expiry() supposedly
to ensure the invoice is well-formed. However, those methods can never
panic or return errors and therefore provide no benefit for this
purpose.
This commit is contained in:
Matt Morehouse 2023-05-23 10:08:49 -05:00
parent 0d2f2aa802
commit 4207be6e50
No known key found for this signature in database
GPG Key ID: CC8ECA224831C982

View File

@ -12,15 +12,7 @@ import (
func FuzzDecode(f *testing.F) {
f.Fuzz(func(t *testing.T, data string) {
inv, err := Decode(data, &chaincfg.TestNet3Params)
if err != nil {
return
}
// Call these functions as a sanity check to make sure the
// invoice is well-formed.
_ = inv.MinFinalCLTVExpiry()
_ = inv.Expiry()
_, _ = Decode(data, &chaincfg.TestNet3Params)
})
}
@ -31,11 +23,6 @@ func FuzzEncode(f *testing.F) {
return
}
// Call these functions as a sanity check to make sure the
// invoice is well-formed.
_ = inv.MinFinalCLTVExpiry()
_ = inv.Expiry()
// Initialize the static key we will be using for this fuzz
// test.
testPrivKey, _ := btcec.PrivKeyFromBytes(testPrivKeyBytes)