Ejemplo n.º 1
0
        public static MiningBlockInfoResponse FromMiningBlockInfo(MiningBlockInfo blockInfo)
        {
            var obj = JsonConvert.DeserializeObject <MiningBlockInfoResponse>(JsonConvert.SerializeObject(blockInfo));

            obj.BlockDataHash = CryptoUtils.GetSha256Hex(JsonConvert.SerializeObject(blockInfo));

            return(obj);
        }
Ejemplo n.º 2
0
 public MinedBlockInfo(MiningBlockInfo mbi)
 {
     this.Transactions      = mbi.Transactions;
     this.PreviousBlockHash = mbi.PreviousBlockHash;
     this.MinedBy           = mbi.MinedBy;
     this.Index             = mbi.Index;
     this.Difficulty        = mbi.Difficulty;
     this.BlockDataHash     = mbi.BlockDataHash;
 }