Class: StellarSpectrum::SendingPayment::GetSleepForRetry

Inherits:
Object
  • Object
show all
Defined in:
lib/stellar_spectrum/services/sending_payment/get_sleep_for_retry.rb

Constant Summary collapse

MAX =
Client::MAX_LOCK_TIME_IN_SECONDS
LEEWAY =
5.freeze

Class Method Summary collapse

Class Method Details

.call(n) ⇒ Object



8
9
10
11
12
# File 'lib/stellar_spectrum/services/sending_payment/get_sleep_for_retry.rb', line 8

def self.call(n)
  fibo = Fibo.(n)
  return fibo if fibo < MAX
  MAX - LEEWAY
end