Package nxt.peer

Class BundlerRate

java.lang.Object
nxt.peer.BundlerRate

public final class BundlerRate extends Object
  • Constructor Details

    • BundlerRate

      public BundlerRate(ChildChain chain, long accountId, long rate, long feeLimit)
      Create an unsigned bundler rate
      Parameters:
      chain - Child chain
      accountId - Account identifier
      rate - Bundler rate
      feeLimit - Current fee limit
    • BundlerRate

      public BundlerRate(ChildChain chain, long rate, long feeLimit, byte[] privateKey)
      Create a signed bundler rate
      Parameters:
      chain - Child chain
      rate - Bundler rate
      feeLimit - Current fee limit
      privateKey - Private key
    • BundlerRate

      public BundlerRate(ByteBuffer buffer) throws BufferUnderflowException
      Create a signed bundler rate
      Parameters:
      buffer - Encoded data
      Throws:
      BufferUnderflowException - Encoded data is too short
  • Method Details

    • getLength

      public int getLength()
      Get the encoded length
      Returns:
      Encoded length
    • getBytes

      public void getBytes(ByteBuffer buffer)
      Get our bytes
      Parameters:
      buffer - Byte buffer
      Throws:
      BufferOverflowException - Allocated buffer is too small
    • getUnsignedBytes

      public byte[] getUnsignedBytes()
      Get the unsigned bytes
      Returns:
      Rate bytes
    • getChain

      public ChildChain getChain()
      Get the child chain
      Returns:
      Child chain
    • getAccountId

      public long getAccountId()
      Get the account identifier
      Returns:
      Account identifier
    • getPublicKey

      public byte[] getPublicKey()
      Get the account public key
      Returns:
      Account public key
    • getRate

      public long getRate()
      Get the bundler rate
      Returns:
      Rate
    • getFeeLimit

      public long getFeeLimit()
      Get the fee limit
      Returns:
      Fee limit
    • getTimestamp

      public int getTimestamp()
      Get the timestamp
      Returns:
      Timestamp
    • getSignature

      public byte[] getSignature()
      Get the signature
      Returns:
      Signature
    • getBalance

      public long getBalance()
      Get the account balance
      Returns:
      Account balance
    • setBalance

      public void setBalance(long balance)
      Set the account balance
      Parameters:
      balance - Account balance
    • hashCode

      public int hashCode()
      Get the hash code
      Overrides:
      hashCode in class Object
      Returns:
      Hash code
    • equals

      public boolean equals(Object obj)
      Check if two bundler rates are equal
      Overrides:
      equals in class Object
      Parameters:
      obj - Bundler rate to compare
      Returns:
      TRUE if the rates are equal