From 53ab22305d9b1a5e3bb4310faeb2bd18eeb11814 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Fri, 24 Jul 2020 13:14:03 -0700 Subject: [PATCH] zpay32: rename to DefaultAssumedFinalCLTVDelta This renames the paramter to clarify that this value is only used when no CLTV value was decoded from the payment request --- zpay32/hophint.go | 7 ++++--- zpay32/invoice.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/zpay32/hophint.go b/zpay32/hophint.go index 25028628..067c8437 100644 --- a/zpay32/hophint.go +++ b/zpay32/hophint.go @@ -3,9 +3,10 @@ package zpay32 import "github.com/btcsuite/btcd/btcec" const ( - // DefaultFinalCLTVDelta is the default value to be used as the final - // CLTV delta for a route if one is unspecified. - DefaultFinalCLTVDelta = 9 + // DefaultAssumedFinalCLTVDelta is the default value to be used as the + // final CLTV delta for a route if one is unspecified in the payment + // request. + DefaultAssumedFinalCLTVDelta = 9 ) // HopHint is a routing hint that contains the minimum information of a channel diff --git a/zpay32/invoice.go b/zpay32/invoice.go index dbb991e6..8444e3ee 100644 --- a/zpay32/invoice.go +++ b/zpay32/invoice.go @@ -324,7 +324,7 @@ func (invoice *Invoice) MinFinalCLTVExpiry() uint64 { return *invoice.minFinalCLTVExpiry } - return DefaultFinalCLTVDelta + return DefaultAssumedFinalCLTVDelta } // validateInvoice does a sanity check of the provided Invoice, making sure it