public static Create ( |
||
version | ||
previousBlock | UInt256 | |
merkleRoot | UInt256 | |
time | DateTimeOffset | |
bits | ||
nonce | ||
return |
public static BlockHeader Create(UInt32 version, UInt256 previousBlock, UInt256 merkleRoot, DateTimeOffset time, UInt32 bits, UInt32 nonce)
{
var hash = DataCalculator.CalculateBlockHash(version, previousBlock, merkleRoot, time, bits, nonce);
return new BlockHeader(version, previousBlock, merkleRoot, time, bits, nonce, hash);
}
}
public BlockHeader With(UInt32?Version = null, UInt256 PreviousBlock = null, UInt256 MerkleRoot = null, DateTimeOffset?Time = null, UInt32?Bits = null, UInt32?Nonce = null) { return(BlockHeader.Create ( Version ?? this.Version, PreviousBlock ?? this.PreviousBlock, MerkleRoot ?? this.MerkleRoot, Time ?? this.Time, Bits ?? this.Bits, Nonce ?? this.Nonce )); }