stratisproject / StratisBitcoinFullNode

Bitcoin full node in C#
https://stratisplatform.com
MIT License
787 stars 315 forks source link

Fix for circular dependency bug #4097

Closed fenix2222 closed 4 years ago

fenix2222 commented 4 years ago

We have a circular dependency bug that needs to be fixed

System.InvalidOperationException: 'A circular dependency was detected for the service of type 'Stratis.Bitcoin.Consensus.IConsensusManager'.
Stratis.Bitcoin.Base.BaseFeature -> Stratis.Bitcoin.Consensus.IConsensusManager(Stratis.Bitcoin.Consensus.ConsensusManager) -> Stratis.Bitcoin.Consensus.IChainedHeaderTree(Stratis.Bitcoin.IntegrationTests.Common.EnvironmentMockUpHelpers.TestChainedHeaderTree) -> Stratis.Bitcoin.Consensus.Validators.IHeaderValidator(Stratis.Bitcoin.Consensus.Validators.HeaderValidator) -> Stratis.Bitcoin.Consensus.IConsensusRuleEngine(Stratis.Bitcoin.Features.PoA.PoAConsensusRuleEngine) -> Stratis.Bitcoin.Features.PoA.ISlotsManager(Stratis.Bitcoin.Features.PoA.SlotsManager) -> Stratis.Bitcoin.Consensus.IConsensusManager'
codingupastorm commented 4 years ago

This was my mistake previously.

Nice fix, thanks @fenix2222.