From 773f9e5eadce1823cdf1a0ebe90b4e732f375f71 Mon Sep 17 00:00:00 2001 From: Dave Hrycyszyn Date: Thu, 18 Aug 2022 10:45:42 +0100 Subject: [PATCH] Moving helpful comment into docs comment --- contracts/vesting/src/vesting/account/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contracts/vesting/src/vesting/account/mod.rs b/contracts/vesting/src/vesting/account/mod.rs index 5418619cfe..b5369aa410 100644 --- a/contracts/vesting/src/vesting/account/mod.rs +++ b/contracts/vesting/src/vesting/account/mod.rs @@ -101,10 +101,9 @@ impl Account { } } + /// Returns the index of the next vesting period. Unless the current time is somehow in the past or vesting has not started yet. + /// In case vesting is over it will always return NUM_VESTING_PERIODS. pub fn get_current_vesting_period(&self, block_time: Timestamp) -> Period { - // Returns the index of the next vesting period. Unless the current time is somehow in the past or vesting has not started yet. - // In case vesting is over it will always return NUM_VESTING_PERIODS. - if block_time.seconds() < self.periods.first().unwrap().start_time { Period::Before } else if self.periods.last().unwrap().end_time() < block_time {