bug fix - if statement logic (#5283)

if statement logic for recently sent block was inverted.
This commit is contained in:
nahuseyoum
2020-03-17 17:52:00 +00:00
committed by GitHub
parent db86094b03
commit 961082606e
@@ -276,7 +276,7 @@ impl<T: Trait> Module<T> {
match last_send {
// If we already have a value in storage and the block number is recent enough
// we avoid sending another transaction at this time.
Some(Some(block)) if block + T::GracePeriod::get() < block_number => {
Some(Some(block)) if block_number < block + T::GracePeriod::get() => {
Err(RECENTLY_SENT)
},
// In every other case we attempt to acquire the lock and send a transaction.