Skip to content

Commit

Permalink
v1 sanity contract: make ExecuteMsg::GasMeter more efficient because …
Browse files Browse the repository at this point in the history
…it's timing out in the CI
  • Loading branch information
assafmo committed Aug 24, 2022
1 parent 898e375 commit 229bc81
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,15 @@ pub fn execute(deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg) -> S
)
.add_attribute("attr3", "🐙")
.add_attribute_plaintext("attr4", "🦄")),
ExecuteMsg::GasMeter {} => loop {},
ExecuteMsg::GasMeter {} => {
// busy work
let mut v = vec![0; 65536];
let mut x = 0;
loop {
x += (x + 1) % 65536;
v[x] = 65536 - x;
}
}
ExecuteMsg::GasMeterProxy {} => Ok(Response::default()),
ExecuteMsg::TransferMoney { amount } => transfer_money(deps, amount),
ExecuteMsg::RecursiveReply {} => recursive_reply(env, deps),
Expand Down

0 comments on commit 229bc81

Please sign in to comment.