Show / Hide Table of Contents

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 Source

GasAvailable

The amount of gas available.

Declaration
public static long GasAvailable { get; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

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 Source

CancelTrace()

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()
| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium