mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-01 10:41:34 +02: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) {
|
func FuzzDecode(f *testing.F) {
|
||||||
f.Fuzz(func(t *testing.T, data string) {
|
f.Fuzz(func(t *testing.T, data string) {
|
||||||
inv, err := Decode(data, &chaincfg.TestNet3Params)
|
_, _ = 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()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,11 +23,6 @@ func FuzzEncode(f *testing.F) {
|
|||||||
return
|
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
|
// Initialize the static key we will be using for this fuzz
|
||||||
// test.
|
// test.
|
||||||
testPrivKey, _ := btcec.PrivKeyFromBytes(testPrivKeyBytes)
|
testPrivKey, _ := btcec.PrivKeyFromBytes(testPrivKeyBytes)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user