public void Estimate_gas_returns_the_estimate_from_the_tracer()
        {
            _timestamper.UtcNow = DateTime.MinValue;
            _timestamper.Add(TimeSpan.FromDays(123));
            BlockHeader header = Build.A.BlockHeader.WithNumber(10).TestObject;
            Transaction tx     = new Transaction();

            tx.Data     = new byte[0];
            tx.GasLimit = Transaction.BaseTxGasCost;

            var gas = _blockchainBridge.EstimateGas(header, tx, default);

            gas.GasSpent.Should().Be(Transaction.BaseTxGasCost);

            _transactionProcessor.Received().CallAndRestore(
                tx,
                Arg.Is <BlockHeader>(bh => bh.Number == 11 && bh.Timestamp == ((ITimestamper)_timestamper).UnixTime.Seconds),
                Arg.Is <CancellationTxTracer>(t => t.InnerTracer is EstimateGasTracer));
        }
        public void Estimate_gas_returns_the_estimate_from_the_tracer()
        {
            BlockHeader header = Build.A.BlockHeader.WithNumber(10).TestObject;
            Transaction tx     = new Transaction();

            tx.GasLimit = 1000;

            long gas = _blockchainBridge.EstimateGas(header, tx);

            gas.Should().Be(1000);

            _transactionProcessor.Received().CallAndRestore(
                tx,
                Arg.Is <BlockHeader>(bh => bh.Number == 11),
                Arg.Any <EstimateGasTracer>());
        }