From 71f4030e54122bf4d0c4af50077464ffde03df0a Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 28 Aug 2020 10:34:30 +0200 Subject: [PATCH 1/2] Add exception to ApplicationExecuted --- src/neo/Ledger/Blockchain.ApplicationExecuted.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/neo/Ledger/Blockchain.ApplicationExecuted.cs b/src/neo/Ledger/Blockchain.ApplicationExecuted.cs index 8134a1bd13..17550b3526 100644 --- a/src/neo/Ledger/Blockchain.ApplicationExecuted.cs +++ b/src/neo/Ledger/Blockchain.ApplicationExecuted.cs @@ -2,6 +2,7 @@ using Neo.SmartContract; using Neo.VM; using Neo.VM.Types; +using System; using System.Linq; namespace Neo.Ledger @@ -13,6 +14,7 @@ partial class ApplicationExecuted public Transaction Transaction; public TriggerType Trigger { get; internal set; } public VMState VMState { get; internal set; } + public Exception FaultException { get; internal set; } public long GasConsumed { get; internal set; } public StackItem[] Stack { get; internal set; } public NotifyEventArgs[] Notifications { get; internal set; } @@ -23,6 +25,7 @@ internal ApplicationExecuted(ApplicationEngine engine) Trigger = engine.Trigger; VMState = engine.State; GasConsumed = engine.GasConsumed; + FaultException = engine.FaultException; Stack = engine.ResultStack.ToArray(); Notifications = engine.Notifications.ToArray(); } From 713291aa0290c8134bc1082239d5d76f03195c8a Mon Sep 17 00:00:00 2001 From: erikzhang Date: Fri, 28 Aug 2020 17:14:39 +0800 Subject: [PATCH 2/2] Rename --- src/neo/Ledger/Blockchain.ApplicationExecuted.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/neo/Ledger/Blockchain.ApplicationExecuted.cs b/src/neo/Ledger/Blockchain.ApplicationExecuted.cs index 17550b3526..698fffeadd 100644 --- a/src/neo/Ledger/Blockchain.ApplicationExecuted.cs +++ b/src/neo/Ledger/Blockchain.ApplicationExecuted.cs @@ -14,7 +14,7 @@ partial class ApplicationExecuted public Transaction Transaction; public TriggerType Trigger { get; internal set; } public VMState VMState { get; internal set; } - public Exception FaultException { get; internal set; } + public Exception Exception { get; internal set; } public long GasConsumed { get; internal set; } public StackItem[] Stack { get; internal set; } public NotifyEventArgs[] Notifications { get; internal set; } @@ -25,7 +25,7 @@ internal ApplicationExecuted(ApplicationEngine engine) Trigger = engine.Trigger; VMState = engine.State; GasConsumed = engine.GasConsumed; - FaultException = engine.FaultException; + Exception = engine.FaultException; Stack = engine.ResultStack.ToArray(); Notifications = engine.Notifications.ToArray(); }