public object ToJson() { return(new { number = Number?.ToJson(), hash = Hash?.ToJson(), parentHash = ParentHash?.ToJson(), nonce = Nonce?.ToJson(), MixHash = MixHash?.ToJson(), sha3Uncles = Sha3Uncles?.ToJson(), logsBloom = LogsBloom?.ToJson(), transactionsRoot = TransactionsRoot?.ToJson(), stateRoot = StateRoot?.ToJson(), receiptsRoot = ReceiptsRoot?.ToJson(), miner = Miner?.ToJson(), difficulty = Difficulty?.ToJson(), totalDifficulty = TotalDifficulty?.ToJson(), extraData = ExtraData?.ToJson(), size = Size?.ToJson(), gasLimit = GasLimit?.ToJson(), gasUsed = GasUsed?.ToJson(), timestamp = Timestamp?.ToJson(), transactions = Transactions?.Select(x => x.ToJson()).ToArray() ?? TransactionHashes?.Select(x => x.ToJson()).ToArray(), uncles = Uncles?.Select(x => x.ToJson()).ToArray() }); }
public BlockHeader Clone() { return(new BlockHeader { Version = Version, Height = Height, Previous = Previous.Clone(), Timestamp = Timestamp, UtxoRoot = UtxoRoot.Clone(), RangeProofRoot = RangeProofRoot.Clone(), KernelRoot = KernelRoot.Clone(), Nonce = Nonce, Pow = Pow.Clone(), Difficulty = Difficulty.Clone(), TotalDifficulty = TotalDifficulty.Clone() }); }