Code example for BigInteger

Methods: hashCode

    public int hashCode() { 
        // A better hashCode is possible, but this works for now. 
        return header.hashCode() ^ chainWork.hashCode() ^ height;
     * Creates a new StoredBlock, calculating the additional fields by adding to the values in this block. 
    public StoredBlock build(Block block) throws VerificationException {
        // Stored blocks track total work done in this chain, because the canonical chain is the one that represents 
        // the largest amount of work done not the tallest. 
        BigInteger chainWork = this.chainWork.add(block.getWork());
        int height = this.height + 1;
        return new StoredBlock(block.cloneAsHeader(), chainWork, height);
Connect your IDE to all the code out there  Get Codota for Java