public void ComputeChecksum(uint256 hashBlock) { MemoryStream ms = new MemoryStream(); hashBlock.AsBitcoinSerializable().ReadWrite(ms, true); this.ReadWrite(ms, true); CalculatedChecksum = Hashes.Hash256(ms.ToArray()); }
public void spanUintSerializationTests() { var v = new uint256(RandomUtils.GetBytes(32)); Assert.Equal(v, new uint256(v.ToBytes())); AssertEx.CollectionEquals(v.ToBytes(), v.AsBitcoinSerializable().ToBytes()); uint256.MutableUint256 mutable = new uint256.MutableUint256(); mutable.ReadWrite(v.ToBytes(), Network.Main); Assert.Equal(v, mutable.Value); }
public void ComputeChecksum(uint256 hashBlock) { MemoryStream ms = new MemoryStream(); hashBlock.AsBitcoinSerializable().ReadWrite(ms, true); this.ReadWrite(ms, true); CalculatedChecksum = Hashes.Hash256(ms.ToArray()); }
public void SetBestBlock(uint256 blockId) { Index.PutAsync("B", blockId.AsBitcoinSerializable()); }
public void SetBestBlock(uint256 blockId) { Index.PutAsync("B", blockId.AsBitcoinSerializable()); }
public void SetBestBlock(uint256 blockId) { this.NoSqlRepository.PutAsync("B", blockId.AsBitcoinSerializable()); }