Class Context

java.lang.Object
com.norswap.nanoeth.Context

public final class Context
extends Object
A holder for values that may change during execution, but we don't want to be constantly passing up and down the call stack.
  • Field Summary

    Fields
    Modifier and Type Field Description
    long blockHeight
    The current block height.
    static Context CONTEXT
    A holder for values that may change during execution, but we don't want to be constantly passing up and down the call stack.
  • Method Summary

    Modifier and Type Method Description
    void reset()
    Resets the context to default values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CONTEXT

      public static final Context CONTEXT
      A holder for values that may change during execution, but we don't want to be constantly passing up and down the call stack.
    • blockHeight

      public long blockHeight
      The current block height. Some operations whose behaviour was changed in a hard fork depend on this value. In particular:
      • EIP-2 forces signature s values to be < secp256k1n/2
  • Method Details

    • reset

      public void reset()
      Resets the context to default values.