Record Class BlockTemplate

java.lang.Object
java.lang.Record
net.lageto.monero.rpc.model.BlockTemplate

public record BlockTemplate(String hashingBlob, String blob, long difficulty, long expectedReward, long height, String nextSeedHash, String prevHash, int reservedOffset, String seedHash, long seedHeight) extends Record
Represents an un-mined Monero block.
See Also:
DaemonRpcClient.getBlockTemplate(String, int)
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockTemplate​(String hashingBlob, String blob, long difficulty, long expectedReward, long height, String nextSeedHash, String prevHash, int reservedOffset, String seedHash, long seedHeight)
    Creates an instance of a BlockTemplate record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the blob record component.
    long
    Returns the value of the difficulty record component.
    boolean
    equals​(Object o)
    Indicates whether some other object is "equal to" this one.
    long
    Returns the value of the expectedReward record component.
    int
    Returns a hash code value for this object.
    Returns the value of the hashingBlob record component.
    long
    Returns the value of the height record component.
    Returns the value of the nextSeedHash record component.
    Returns the value of the prevHash record component.
    int
    Returns the value of the reservedOffset record component.
    Returns the value of the seedHash record component.
    long
    Returns the value of the seedHeight record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BlockTemplate

      public BlockTemplate(String hashingBlob, String blob, long difficulty, long expectedReward, long height, String nextSeedHash, String prevHash, int reservedOffset, String seedHash, long seedHeight)
      Creates an instance of a BlockTemplate record class.
      Parameters:
      hashingBlob - the value for the hashingBlob record component
      blob - the value for the blob record component
      difficulty - the value for the difficulty record component
      expectedReward - the value for the expectedReward record component
      height - the value for the height record component
      nextSeedHash - the value for the nextSeedHash record component
      prevHash - the value for the prevHash record component
      reservedOffset - the value for the reservedOffset record component
      seedHash - the value for the seedHash record component
      seedHeight - the value for the seedHeight record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashingBlob

      public String hashingBlob()
      Returns the value of the hashingBlob record component.
      Returns:
      the value of the hashingBlob record component
    • blob

      public String blob()
      Returns the value of the blob record component.
      Returns:
      the value of the blob record component
    • difficulty

      public long difficulty()
      Returns the value of the difficulty record component.
      Returns:
      the value of the difficulty record component
    • expectedReward

      public long expectedReward()
      Returns the value of the expectedReward record component.
      Returns:
      the value of the expectedReward record component
    • height

      public long height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • nextSeedHash

      public String nextSeedHash()
      Returns the value of the nextSeedHash record component.
      Returns:
      the value of the nextSeedHash record component
    • prevHash

      public String prevHash()
      Returns the value of the prevHash record component.
      Returns:
      the value of the prevHash record component
    • reservedOffset

      public int reservedOffset()
      Returns the value of the reservedOffset record component.
      Returns:
      the value of the reservedOffset record component
    • seedHash

      public String seedHash()
      Returns the value of the seedHash record component.
      Returns:
      the value of the seedHash record component
    • seedHeight

      public long seedHeight()
      Returns the value of the seedHeight record component.
      Returns:
      the value of the seedHeight record component