Skip to content

Commit

Permalink
fuzz: program_result as u64 (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
febo authored Jan 13, 2025
1 parent a26e185 commit 81393c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fuzz/fixture/proto/invoke.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ message InstrEffects {
uint64 execution_time = 2;

// Program return code. Zero is success, errors are non-zero.
uint32 program_result = 3;
uint64 program_result = 3;

// The instruction return data.
bytes return_data = 4;
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fixture/src/effects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct Effects {
/// Execution time for instruction.
pub execution_time: u64,
// Program return code. Zero is success, errors are non-zero.
pub program_result: u32,
pub program_result: u64,
pub return_data: Vec<u8>,
/// Resulting accounts with state, to be checked post-simulation.
pub resulting_accounts: Vec<(Pubkey, AccountSharedData)>,
Expand Down
4 changes: 2 additions & 2 deletions harness/src/fuzz/mollusk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ impl From<&InstructionResult> for FuzzEffects {

let program_result = match &input.program_result {
ProgramResult::Success => 0,
ProgramResult::Failure(e) => u64::from(e.clone()) as u32,
ProgramResult::UnknownError(_) => u32::MAX, //TODO
ProgramResult::Failure(e) => u64::from(e.clone()),
ProgramResult::UnknownError(_) => u64::MAX, //TODO
};

let resulting_accounts = input.resulting_accounts.clone();
Expand Down

0 comments on commit 81393c6

Please sign in to comment.