public static BlockPosData Parse(PosParameters pos) { var posData = new BlockPosData { Flags = pos.Flags.ToString(), Mint = pos.Mint, ProofHash = pos.HashProof.ToString(), StakeModifier = pos.StakeModifier.ToString(), StakeModifierV2 = pos.StakeModifierV2.ToString(), StakeTime = pos.StakeTime }; return(posData); }
public static BlockHeaderData Parse(BlockHeader header) { var headerData = new BlockHeaderData { PowHash = header.GetPoWHash().ToString(), Version = header.Version, Bits = header.Bits.ToUInt256().ToString(), Difficulty = header.Bits.Difficulty, BlockTime = header.BlockTime.ToUnixTimeSeconds(), MerkleRoot = header.HashMerkleRoot.ToString(), HashPrevBlock = header.HashPrevBlock.ToString(), Nonce = header.Nonce, Time = header.Time, PosData = BlockPosData.Parse(header.PosParameters) }; return(headerData); }