Class BlockOverrides

java.lang.Object
org.hyperledger.besu.plugin.data.BlockOverrides

public class BlockOverrides extends Object
BlockOverrides represents the block overrides for a block.
  • Constructor Details

    • BlockOverrides

      public BlockOverrides(Optional<org.hyperledger.besu.datatypes.parameters.UnsignedLongParameter> timestamp, Optional<org.hyperledger.besu.datatypes.parameters.UnsignedLongParameter> blockNumber, Optional<org.hyperledger.besu.datatypes.Hash> blockHash, Optional<org.hyperledger.besu.datatypes.parameters.UnsignedLongParameter> gasLimit, Optional<org.hyperledger.besu.datatypes.Address> feeRecipient, Optional<org.hyperledger.besu.datatypes.Wei> baseFeePerGas, Optional<org.hyperledger.besu.datatypes.Wei> blobBaseFee, Optional<org.hyperledger.besu.datatypes.Hash> stateRoot, Optional<BigInteger> difficulty, Optional<org.apache.tuweni.bytes.Bytes> extraData, Optional<String> mixHashOrPrevRandao, Optional<String> parentBeaconBlockRoot)
      Constructs a new BlockOverrides instance.
      Parameters:
      timestamp - the optional timestamp
      blockNumber - the optional block number
      blockHash - the optional block hash
      gasLimit - the optional gas limit
      feeRecipient - the optional fee recipient
      baseFeePerGas - the optional base fee per gas
      blobBaseFee - the optional blob base fee
      stateRoot - the optional state root
      difficulty - the optional difficulty
      extraData - the optional extra data
      mixHashOrPrevRandao - the optional mix hash or previous Randao
      parentBeaconBlockRoot - the optional parent beacon block root
  • Method Details

    • getBlockNumber

      public Optional<Long> getBlockNumber()
      Gets the block number.
      Returns:
      the optional block number
    • getBlockHash

      public Optional<org.hyperledger.besu.datatypes.Hash> getBlockHash()
      Gets the block hash.
      Returns:
      the optional block hash
    • getTimestamp

      public Optional<Long> getTimestamp()
      Gets the timestamp.
      Returns:
      the optional timestamp
    • setTimestamp

      public void setTimestamp(Long timestamp)
      Sets the timestamp.
      Parameters:
      timestamp - the timestamp to set
    • setBlockNumber

      public void setBlockNumber(Long blockNumber)
      Sets the block number.
      Parameters:
      blockNumber - the block number to set
    • getGasLimit

      public Optional<Long> getGasLimit()
      Gets the gas limit.
      Returns:
      the optional gas limit
    • getFeeRecipient

      public Optional<org.hyperledger.besu.datatypes.Address> getFeeRecipient()
      Gets the fee recipient.
      Returns:
      the optional fee recipient
    • getBaseFeePerGas

      public Optional<org.hyperledger.besu.datatypes.Wei> getBaseFeePerGas()
      Gets the base fee per gas.
      Returns:
      the optional base fee per gas
    • getBlobBaseFee

      public Optional<org.hyperledger.besu.datatypes.Wei> getBlobBaseFee()
      Gets the blob base fee.
      Returns:
      the optional blob base fee
    • getStateRoot

      public Optional<org.hyperledger.besu.datatypes.Hash> getStateRoot()
      Gets the state root.
      Returns:
      the optional state root
    • getDifficulty

      public Optional<BigInteger> getDifficulty()
      Gets the difficulty.
      Returns:
      the optional difficulty
    • getExtraData

      public Optional<org.apache.tuweni.bytes.Bytes> getExtraData()
      Gets the extra data.
      Returns:
      the optional extra data
    • getMixHashOrPrevRandao

      public Optional<org.apache.tuweni.bytes.Bytes32> getMixHashOrPrevRandao()
      Gets the mix hash or previous Randao.
      Returns:
      the optional mix hash or previous Randao
    • getBlockHashLookup

      public Optional<Function<Long, org.hyperledger.besu.datatypes.Hash>> getBlockHashLookup()
      Gets the block hash lookup.
      Returns:
      the optional block hash lookup
    • getParentBeaconBlockRoot

      public Optional<org.apache.tuweni.bytes.Bytes32> getParentBeaconBlockRoot()
      Gets the parent beacon block root.
      Returns:
      the optional parent beacon block root
    • builder

      public static BlockOverrides.Builder builder()
      Creates a new Builder instance.
      Returns:
      a new Builder