public void ExecuteBlockWithoutTransactions() { Block block = new Block(0, null); var state = new AccountsState(); var processor = new TransactionProcessor(); var result = processor.ExecuteBlock(block, state); Assert.IsNotNull(result); Assert.AreSame(state, result); }
public void ExecuteBlockWithTransactionWithoutFunds() { Transaction tx = CreateTransaction(100); Block block = new Block(0, null, new Transaction[] { tx }); var state = new AccountsState(); var processor = new TransactionProcessor(); var result = processor.ExecuteBlock(block, state); Assert.IsNotNull(result); Assert.AreSame(state, result); Assert.AreEqual(BigInteger.Zero, state.Get(tx.Sender).Balance); Assert.AreEqual(BigInteger.Zero, state.Get(tx.Receiver).Balance); }