Skip to content

Commit

Permalink
fix Request.canFulfill check
Browse files Browse the repository at this point in the history
  • Loading branch information
sisyphusSmiling committed Nov 15, 2024
1 parent cd585ad commit f8278b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion contracts/RandomConsumer.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,13 @@ access(all) contract RandomConsumer {
self.fulfilled = false
}

/// Returns whether the request can be fulfilled as defined by whether it has already been fulfilled and the
/// created block height has been surpassed.
///
/// @param: True if it can be fulfille, false otherwise
///
access(all) view fun canFullfill(): Bool {
return !self.fulfilled && getCurrentBlock().height >= self.block
return !self.fulfilled && getCurrentBlock().height > self.block
}

/// Returns the Flow's random source for the requested block height
Expand Down

0 comments on commit f8278b3

Please sign in to comment.