Skip to content

Refactor/Move block processor in test to DI.#8959

Merged
asdacap merged 1 commit into
masterfrom
test/move-main-processing-to-di
Jul 26, 2025
Merged

Refactor/Move block processor in test to DI.#8959
asdacap merged 1 commit into
masterfrom
test/move-main-processing-to-di

Conversation

@asdacap

@asdacap asdacap commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

Require #8950

  • Cutting down BlockProcessor constructor call to make it easy to split.
  • Move main block processor for TestBlockchain to DI.
  • Move some CliqueBlockProducerTest to DI.

Types of changes

What types of changes does your code introduce?

  • Refactoring

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

  • Its all test code.

@asdacap asdacap force-pushed the fix/aura-merge-missed-witdhrawal-processorr branch from ced19c9 to 1201ab1 Compare July 11, 2025 09:12
@asdacap asdacap force-pushed the test/move-main-processing-to-di branch from 273e14b to a577fd0 Compare July 11, 2025 09:17
@asdacap asdacap mentioned this pull request Jul 13, 2025
6 tasks
@asdacap asdacap force-pushed the fix/aura-merge-missed-witdhrawal-processorr branch from 33341c2 to ccc1572 Compare July 14, 2025 02:58
@asdacap asdacap force-pushed the test/move-main-processing-to-di branch from 6214f02 to a3828ba Compare July 14, 2025 02:59
public ProducedBlockSuggester Suggester { get; protected set; } = null!;

public IExecutionRequestsProcessor MainExecutionRequestsProcessor => ((MainBlockProcessingContext)_fromContainer.MainProcessingContext).LifetimeScope.Resolve<IExecutionRequestsProcessor>();
public IExecutionRequestsProcessor MainExecutionRequestsProcessor => ((AutoMainProcessingContext)_fromContainer.MainProcessingContext).LifetimeScope.Resolve<IExecutionRequestsProcessor>();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why Auto and not Main?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already MainProcessingContext in prod. Its manual and not auto.

}

// simulating restarts - we stopped the old blockchain processor and create the new one
_currentBlockchainProcessor = new BlockchainProcessor(BlockTree, BlockProcessor,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it support different IBlockchainProcessor types? (We really have one major now, so maybe not)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its probably fine for this specific test suite. Otherwise, I'd have to make sure blockchain processor is restartable just for this test.

@asdacap asdacap force-pushed the fix/aura-merge-missed-witdhrawal-processorr branch from ccc1572 to ffb4e0c Compare July 21, 2025 13:43
@asdacap asdacap force-pushed the test/move-main-processing-to-di branch from a3828ba to 50eb2bc Compare July 21, 2025 13:44
@asdacap asdacap force-pushed the fix/aura-merge-missed-witdhrawal-processorr branch from ffb4e0c to 8da1902 Compare July 23, 2025 12:25
@asdacap asdacap force-pushed the test/move-main-processing-to-di branch from 50eb2bc to 823b270 Compare July 23, 2025 12:26
Base automatically changed from fix/aura-merge-missed-witdhrawal-processorr to master July 25, 2025 22:54
@asdacap asdacap force-pushed the test/move-main-processing-to-di branch from 823b270 to d4b992c Compare July 26, 2025 01:04
@asdacap asdacap merged commit 6d90021 into master Jul 26, 2025
135 of 137 checks passed
@asdacap asdacap deleted the test/move-main-processing-to-di branch July 26, 2025 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants