Skip to content
Snippets Groups Projects
Commit 96108260 authored by nahuseyoum's avatar nahuseyoum Committed by GitHub
Browse files

bug fix - if statement logic (#5283)

if statement logic for recently sent block was inverted.
parent db86094b
No related merge requests found
......@@ -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.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment