예제 #1
0
        public void ComputeChecksum(uint256 hashBlock)
        {
            MemoryStream ms = new MemoryStream();

            hashBlock.AsBitcoinSerializable().ReadWrite(ms, true);
            this.ReadWrite(ms, true);
            CalculatedChecksum = Hashes.Hash256(ms.ToArray());
        }
예제 #2
0
        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);
        }
예제 #3
0
		public void ComputeChecksum(uint256 hashBlock)
		{
			MemoryStream ms = new MemoryStream();
			hashBlock.AsBitcoinSerializable().ReadWrite(ms, true);
			this.ReadWrite(ms, true);
			CalculatedChecksum = Hashes.Hash256(ms.ToArray());
		}
예제 #4
0
		public void SetBestBlock(uint256 blockId)
		{
			Index.PutAsync("B", blockId.AsBitcoinSerializable());
		}
예제 #5
0
 public void SetBestBlock(uint256 blockId)
 {
     Index.PutAsync("B", blockId.AsBitcoinSerializable());
 }
예제 #6
0
 public void SetBestBlock(uint256 blockId)
 {
     this.NoSqlRepository.PutAsync("B", blockId.AsBitcoinSerializable());
 }