public new void OneTimeSetUp() { base.OneTimeSetUp(); block1 = _GenesisBlock.Child().AddTx(tx).Tag("block1"); block2 = _GenesisBlock.Child().AddTx(tx).Tag("block2"); block3 = block2.Child().Tag("block3"); }
public void TipShouldNotBecomeNewBlock() { block2 = _GenesisBlock.Child(); block3 = block2.Child(); Assert.That(HandleBlock(block3), Is.EqualTo(BlockVerificationHelper.BkResultEnum.AcceptedOrphan)); Assert.That(_BlockChain.Tip.Value.Equals(block1), Is.True); }
public new void OneTimeSetUp() { base.OneTimeSetUp(); block1_tx = Utils.GetTx().AddOutput(Key.Create().Address, Consensus.Tests.zhash, 1).Tag("block1_tx"); block2_tx = Utils.GetTx().AddOutput(Key.Create().Address, Consensus.Tests.zhash, 1).Tag("block2_tx"); block3_tx = Utils.GetTx().AddOutput(Key.Create().Address, Consensus.Tests.zhash, 1).Tag("block3_tx"); block4_tx = Utils.GetTx().AddOutput(Key.Create().Address, Consensus.Tests.zhash, 1).Tag("block4_tx"); block5_tx = Utils.GetTx().AddOutput(Key.Create().Address, Consensus.Tests.zhash, 1).Tag("block5_tx"); block1 = _GenesisBlock.Child().AddTx(block1_tx).Tag("block1"); block2 = _GenesisBlock.Child().AddTx(block2_tx).Tag("block2"); block3 = block2.Child().AddTx(block3_tx).Tag("block3"); block4 = block1.Child().AddTx(block4_tx).Tag("block4"); block5 = block4.Child().AddTx(block5_tx).Tag("block5"); }
public void TipShouldBecomeBranch() { block3 = block2.Child(); Assert.That(HandleBlock(block3), Is.EqualTo(BlockVerificationHelper.BkResultEnum.Accepted)); Assert.That(_BlockChain.Tip.Value.Equals(block3), Is.True); }