Class BlockLocator

  • public final class BlockLocator
    extends java.lang.Object
    Represents Block Locator in GetBlocks and GetHeaders messages
    • Constructor Detail

      • BlockLocator

        public BlockLocator()
      • BlockLocator

        public BlockLocator​(java.util.List<Sha256Hash> hashes)
        Creates a Block locator with defined list of hashes.
    • Method Detail

      • size

        public int size()
        Returns the number of hashes in this block locator.
      • getHashes

        public java.util.List<Sha256Hash> getHashes()
        Returns List of Block locator hashes.
      • get

        public Sha256Hash get​(int i)
        Get hash by index from this block locator.
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        equals in class java.lang.Object