Skip to content

Commit

Permalink
Add OOCSH to oocErrors in FullTracer
Browse files Browse the repository at this point in the history
  • Loading branch information
fractasy committed Sep 4, 2024
1 parent 5301a88 commit 8427756
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 5 additions & 4 deletions src/main_sm/fork_7/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ set<string> oocErrors = {
"OOCM",
"OOCA",
"OOCPA",
"OOCPO" };
"OOCPO",
"OOCSH" };

//////////
// UTILS
Expand Down Expand Up @@ -337,7 +338,7 @@ zkresult FullTracer::handleEvent(Context &ctx, const RomCommand &cmd)
{
if ( (oocErrors.find(lastError)==oocErrors.end()) && (ctx.totalTransferredBalance != 0) )
{
zklog.error("FullTracer::handleEvent(onFinishTx) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10));
zklog.error("FullTracer::handleEvent(onFinishTx) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10) + " lastError=" + lastError);
return ZKR_SM_MAIN_BALANCE_MISMATCH;
}
return onFinishTx(ctx, cmd);
Expand All @@ -350,7 +351,7 @@ zkresult FullTracer::handleEvent(Context &ctx, const RomCommand &cmd)
{
if ( (oocErrors.find(lastError)==oocErrors.end()) && (ctx.totalTransferredBalance != 0) )
{
zklog.error("FullTracer::handleEvent(onFinishBlock) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10));
zklog.error("FullTracer::handleEvent(onFinishBlock) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10) + " lastError=" + lastError);
return ZKR_SM_MAIN_BALANCE_MISMATCH;
}
return onFinishBlock(ctx);
Expand All @@ -363,7 +364,7 @@ zkresult FullTracer::handleEvent(Context &ctx, const RomCommand &cmd)
{
if ( (oocErrors.find(lastError)==oocErrors.end()) && (ctx.totalTransferredBalance != 0) )
{
zklog.error("FullTracer::handleEvent(onFinishBatch) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10));
zklog.error("FullTracer::handleEvent(onFinishBatch) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10) + " lastError=" + lastError);
return ZKR_SM_MAIN_BALANCE_MISMATCH;
}
return onFinishBatch(ctx, cmd);
Expand Down
9 changes: 5 additions & 4 deletions src/main_sm/fork_8/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ set<string> oocErrors = {
"OOCM",
"OOCA",
"OOCPA",
"OOCPO" };
"OOCPO",
"OOCSH" };

//////////
// UTILS
Expand Down Expand Up @@ -337,7 +338,7 @@ zkresult FullTracer::handleEvent(Context &ctx, const RomCommand &cmd)
{
if ( (oocErrors.find(lastError)==oocErrors.end()) && (ctx.totalTransferredBalance != 0) )
{
zklog.error("FullTracer::handleEvent(onFinishTx) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10));
zklog.error("FullTracer::handleEvent(onFinishTx) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10) + " lastError=" + lastError);
return ZKR_SM_MAIN_BALANCE_MISMATCH;
}
return onFinishTx(ctx, cmd);
Expand All @@ -350,7 +351,7 @@ zkresult FullTracer::handleEvent(Context &ctx, const RomCommand &cmd)
{
if ( (oocErrors.find(lastError)==oocErrors.end()) && (ctx.totalTransferredBalance != 0) )
{
zklog.error("FullTracer::handleEvent(onFinishBlock) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10));
zklog.error("FullTracer::handleEvent(onFinishBlock) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10) + " lastError=" + lastError);
return ZKR_SM_MAIN_BALANCE_MISMATCH;
}
return onFinishBlock(ctx);
Expand All @@ -363,7 +364,7 @@ zkresult FullTracer::handleEvent(Context &ctx, const RomCommand &cmd)
{
if ( (oocErrors.find(lastError)==oocErrors.end()) && (ctx.totalTransferredBalance != 0) )
{
zklog.error("FullTracer::handleEvent(onFinishBatch) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10));
zklog.error("FullTracer::handleEvent(onFinishBatch) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10) + " lastError=" + lastError);
return ZKR_SM_MAIN_BALANCE_MISMATCH;
}
return onFinishBatch(ctx, cmd);
Expand Down
9 changes: 5 additions & 4 deletions src/main_sm/fork_9/main/full_tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ set<string> oocErrors = {
"OOCM",
"OOCA",
"OOCPA",
"OOCPO" };
"OOCPO",
"OOCSH" };

//////////
// UTILS
Expand Down Expand Up @@ -348,7 +349,7 @@ zkresult FullTracer::handleEvent(Context &ctx, const RomCommand &cmd)
{
if ( (oocErrors.find(lastError)==oocErrors.end()) && (ctx.totalTransferredBalance != 0) )
{
zklog.error("FullTracer::handleEvent(onFinishTx) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10));
zklog.error("FullTracer::handleEvent(onFinishTx) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10) + " lastError=" + lastError);
return ZKR_SM_MAIN_BALANCE_MISMATCH;
}
return onFinishTx(ctx, cmd);
Expand All @@ -361,7 +362,7 @@ zkresult FullTracer::handleEvent(Context &ctx, const RomCommand &cmd)
{
if ( (oocErrors.find(lastError)==oocErrors.end()) && (ctx.totalTransferredBalance != 0) )
{
zklog.error("FullTracer::handleEvent(onFinishBlock) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10));
zklog.error("FullTracer::handleEvent(onFinishBlock) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10) + " lastError=" + lastError);
return ZKR_SM_MAIN_BALANCE_MISMATCH;
}
return onFinishBlock(ctx);
Expand All @@ -374,7 +375,7 @@ zkresult FullTracer::handleEvent(Context &ctx, const RomCommand &cmd)
{
if ( (oocErrors.find(lastError)==oocErrors.end()) && (ctx.totalTransferredBalance != 0) )
{
zklog.error("FullTracer::handleEvent(onFinishBatch) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10));
zklog.error("FullTracer::handleEvent(onFinishBatch) found ctx.totalTransferredBalance=" + ctx.totalTransferredBalance.get_str(10) + " lastError=" + lastError);
return ZKR_SM_MAIN_BALANCE_MISMATCH;
}
return onFinishBatch(ctx, cmd);
Expand Down

0 comments on commit 8427756

Please sign in to comment.