Class BlockHeader

java.lang.Object
com.bradyrussell.uiscoin.block.BlockHeader
All Implemented Interfaces:
SerializableAsBinaryData, VerifiableWithBlockchain

public class BlockHeader
extends java.lang.Object
implements SerializableAsBinaryData, VerifiableWithBlockchain
  • Field Summary

    Fields 
    Modifier and Type Field Description
    int BlockHeight  
    int DifficultyTarget  
    byte[] HashMerkleRoot  
    byte[] HashPreviousBlock  
    int Nonce  
    long Time  
    int Version  
  • Constructor Summary

    Constructors 
    Constructor Description
    BlockHeader()  
    BlockHeader​(int version, long time, int difficultyTarget, byte[] hashPreviousBlock, byte[] hashMerkleRoot)  
    BlockHeader​(int version, long time, int difficultyTarget, int blockHeight)  
    BlockHeader​(int version, long time, int difficultyTarget, int nonce, int blockHeight)  
    BlockHeader​(int version, long time, int difficultyTarget, int nonce, int blockHeight, byte[] hashPreviousBlock, byte[] hashMerkleRoot)  
    BlockHeader​(BlockHeader toCopy)  
  • Method Summary

    Modifier and Type Method Description
    static int calculateDifficultyTarget​(long TimeSinceLastBlock, int LastBlockDifficulty)  
    byte[] getBinaryData()  
    byte[] getHash()  
    int getSize()  
    int setBinaryData​(byte[] Data)  
    boolean verify​(BlockchainStorage blockchain)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait