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()
        Overrides:
        toString in class java.lang.Object
      • hashCode

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

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