#get_max_expiration_ledger returns 1 less than max

6 messages · Page 1 of 1 (latest)

plush cliff
#

When I configure a max expiration ledger on the ledger info as 5, and then call get_max_expiration_ledger, the result I get back is 4.

Why is that?

#

If I set 0, the result is 0. If I set 1, the result is 0. If I set 2, the result is 1. 😕

#

@flat sapphire do you know?

#

Is it because the current ledger is counted, and so it's saying up to 4 ledgers from now?

flat sapphire
#

commented on your PR regarding this

#

this returns current_seq + max_entry_expiration - 1. should be just max_entry_expiration instead