-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
solana: Add fuzz harness for RateLimitState
- Loading branch information
1 parent
3bb0c4c
commit cc6f4e5
Showing
4 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[workspace] | ||
members = [ | ||
"programs/*", | ||
"modules/*" | ||
"modules/*", | ||
] | ||
resolver = "2" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use honggfuzz::fuzz; | ||
use example_native_token_transfers::queue::rate_limit::RateLimitState; | ||
|
||
fn main() { | ||
loop { | ||
fuzz!(|input: (u64, u64)| { | ||
let (limit, new_limit) = input; | ||
|
||
let mut rls = RateLimitState::new(limit); | ||
rls.set_limit(new_limit) | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters