Skip to content

Commit

Permalink
Cleanup debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi-D-coder committed Jul 31, 2024
1 parent c22f118 commit b92c9d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
13 changes: 1 addition & 12 deletions kairos-contracts/demo-contract/contract/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,6 @@ pub extern "C" fn submit_batch() {
runtime::revert(ApiError::User(0u16));
};

// In CCTL we hit error_message: "Interpreter error: trap: Code(Unreachable)",
// In the test execution we finish verification successfully, and hit revert 9999.
let _ = receipt
.verify([
2249819926, 1807275128, 879420467, 753150136, 3885109892, 1252737579, 1362575552,
43533945,
])
.map_err(|_| runtime::revert(ApiError::User(1u16)));

runtime::revert(ApiError::User(9999u16));

let ProofOutputs {
pre_batch_trie_root,
post_batch_trie_root,
Expand Down Expand Up @@ -218,7 +207,7 @@ fn check_batch_deposits_against_unprocessed(batch_deposits: &[L1Deposit]) -> u32
batch_deposits.iter().zip(unprocessed_deposits.iter()).fold(
unprocessed_deposits_idx,
|unprocessed_deposits_idx, (batch_deposit, (event_idx, unprocessed_deposit))| {
if unprocessed_deposits_idx <= *event_idx {
if unprocessed_deposits_idx > *event_idx {
runtime::revert(ApiError::User(202u16));
}

Expand Down
1 change: 0 additions & 1 deletion kairos-server/src/state/submit_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ pub async fn submit_proof_to_contract(
})
.expect("could not get deploy");

dbg!(&response.result.execution_results);
match response.result.execution_results.first() {
Some(result) => match &result.result {
ExecutionResult::Failure { error_message, .. } => {
Expand Down

0 comments on commit b92c9d9

Please sign in to comment.