Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Fixed GAS decimals (#550)
Browse files Browse the repository at this point in the history
Co-authored-by: Shargon <shargon@gmail.com>
  • Loading branch information
陈志同 and shargon committed Mar 11, 2020
1 parent 72ff1b9 commit e81556e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neo-cli/CLI/MainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ private bool OnInvokeCommand(string[] args)
using (ApplicationEngine engine = ApplicationEngine.Run(tx.Script, tx, testMode: true))
{
Console.WriteLine($"VM State: {engine.State}");
Console.WriteLine($"Gas Consumed: {engine.GasConsumed}");
Console.WriteLine($"Gas Consumed: {new BigDecimal(engine.GasConsumed, NativeContract.GAS.Decimals)}");
Console.WriteLine($"Evaluation Stack: {new JArray(engine.ResultStack.Select(p => p.ToParameter().ToJson()))}");
Console.WriteLine();
if (engine.State.HasFlag(VMState.FAULT))
Expand Down

0 comments on commit e81556e

Please sign in to comment.