Пример #1
0
 public V2Selector(
     IBundleSource bundleSource,
     IBundleSimulator bundleSimulator,
     ITailGasPriceCalculator tailGasPriceCalculator,
     long maxBundlesGasUsedRatio = 100)
 {
     _bundleSource           = bundleSource;
     _bundleSimulator        = bundleSimulator;
     _tailGasPriceCalculator = tailGasPriceCalculator;
     _maxBundlesGasUsedRatio = maxBundlesGasUsedRatio;
 }
Пример #2
0
        public async Task should_remove_bundle_simulations_on_eviction(long headDelta, int[] expectedSimulations)
        {
            int head = 3;
            IBundleSimulator   bundleSimulator  = Substitute.For <IBundleSimulator>();
            SimulatedMevBundle successfulBundle = new(new MevBundle(1, Array.Empty <BundleTransaction>()),
                                                      0, true, UInt256.Zero, UInt256.Zero, UInt256.Zero);

            bundleSimulator.Simulate(Arg.Any <MevBundle>(), Arg.Any <BlockHeader>(), Arg.Any <CancellationToken>())
            .Returns(Task.FromResult(successfulBundle));

            TestContext tc = new(default, bundleSimulator, new MevConfig()
Пример #3
0
 public V1Selector(IBundleSource bundleSource, IBundleSimulator bundleSimulator)
 {
     _bundleSource    = bundleSource;
     _bundleSimulator = bundleSimulator;
 }