mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
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:
parent
0d2f2aa802
commit
4207be6e50
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user