Ejemplo n.º 1
0
 public async Task SendBlockTipAsync(IBlockTip blockTip)
 {
     if (this.CanSend())
     {
         await this.SendAsync((BlockTipModel)blockTip, FederationGatewayRouteEndPoint.ReceiveCurrentBlockTip).ConfigureAwait(false);
     }
 }
Ejemplo n.º 2
0
        public void ShouldSerialiseAsJson()
        {
            IBlockTip blockTip = PrepareBlockTip();
            string    asJson   = blockTip.ToString();

            var reconverted = JsonConvert.DeserializeObject <BlockTipModel>(asJson);

            reconverted.Hash.Should().Be(blockTip.Hash);
            reconverted.Height.Should().Be(blockTip.Height);
            reconverted.MatureConfirmations.Should().Be(blockTip.MatureConfirmations);
        }
Ejemplo n.º 3
0
 /// <inheritdoc />
 public Task PersistNewSourceChainTip(IBlockTip newTip)
 {
     throw new NotImplementedException();
 }