Skip to content

Commit

Permalink
Throw proper exception if TestMaliciousOnChainConflict fails
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Shaleva <[email protected]>
  • Loading branch information
AnnaShaleva committed Nov 7, 2023
1 parent c6105c0 commit 32d1341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Neo.UnitTests/Ledger/UT_Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void TestMaliciousOnChainConflict()
using (ApplicationEngine engine2 = ApplicationEngine.Create(TriggerType.OnPersist, null, snapshot, block, TestBlockchain.TheNeoSystem.Settings, 0))
{
engine2.LoadScript(onPersistScript);
if (engine2.Execute() != VMState.HALT) throw new InvalidOperationException();
if (engine2.Execute() != VMState.HALT) throw engine2.FaultException;
engine2.Snapshot.Commit();
}
snapshot.Commit();
Expand All @@ -168,7 +168,7 @@ public void TestMaliciousOnChainConflict()
using (ApplicationEngine engine2 = ApplicationEngine.Create(TriggerType.PostPersist, null, snapshot, block, TestBlockchain.TheNeoSystem.Settings, 0))
{
engine2.LoadScript(postPersistScript);
if (engine2.Execute() != VMState.HALT) throw new InvalidOperationException();
if (engine2.Execute() != VMState.HALT) throw engine2.FaultException;
engine2.Snapshot.Commit();
}
snapshot.Commit();
Expand Down

0 comments on commit 32d1341

Please sign in to comment.