Skip to content

Commit

Permalink
rusk: fixed memory trap in protected tests
Browse files Browse the repository at this point in the history
  • Loading branch information
miloszm committed Feb 6, 2024
1 parent 670b87e commit 9fb8a77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rusk/tests/services/protected.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fn initial_state<P: AsRef<Path>>(dir: P) -> Result<Rusk> {
}

const SENDER_INDEX: u64 = 0;
const CALL_DATA: [u8; 1024] = [0u8; 1024];

fn verify_protected_method(
contract: ContractId,
Expand All @@ -53,7 +54,7 @@ fn verify_protected_method(
&mut rng,
contract.to_bytes().into(),
String::from(protected_method),
(),
CALL_DATA,
SENDER_INDEX,
&refund,
GAS_LIMIT,
Expand Down

0 comments on commit 9fb8a77

Please sign in to comment.