Class GasTracer
Provides a way to trace the gas usage of an ITransaction. It will be initialize each transaction.
GasTracer is thread-local, so it can be used in a multi-threaded environment.
Inheritance
System.Object
GasTracer
Namespace: Libplanet.Action
Assembly: Libplanet.Action.dll
Syntax
public static class GasTracer : object
Properties
| Improve this Doc View SourceGasAvailable
The amount of gas available.
Declaration
public static long GasAvailable { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
GasUsed
The amount of gas used so far.
Declaration
public static long GasUsed { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
| Improve this Doc View SourceCancelTrace()
Provides a way to trace the gas usage of an ITransaction. It will be initialize each transaction.
GasTracer is thread-local, so it can be used in a multi-threaded environment.
Declaration
public static void CancelTrace()
UseGas(Int64)
Using gas by the specified amount.
Declaration
public static void UseGas(long gas)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | gas | The amount of gas to use. |