From bedd56ec677431d232f0efbbfc665013fd9744bc Mon Sep 17 00:00:00 2001 From: quantumagi Date: Fri, 31 Jan 2020 22:08:55 +1100 Subject: [PATCH 1/6] Move shared files to core consensus feature --- .../Consensus/BlockNotFoundException.cs | 11 ++++++++++ .../Consensus}/CoinView.cs | 2 +- .../Consensus}/FetchCoinsResponse.cs | 2 +- .../Consensus}/IBackedCoinView.cs | 2 +- .../Consensus}/IStakeChain.cs | 2 +- .../Rules}/CheckPosTransactionRule.cs | 4 +--- .../Rules}/CheckPowTransactionRule.cs | 4 +--- .../Consensus/Rules}/CoinviewRule.cs | 4 +--- .../Consensus/Rules}/HeaderVersionRule.cs | 3 +-- .../Consensus/Rules}/PosFutureDriftRule.cs | 8 +++---- .../Consensus/Rules/UtxoRuleContext.cs | 21 +++++++++++++++++++ .../Consensus}/UnspentOutputSet.cs | 2 +- 12 files changed, 44 insertions(+), 21 deletions(-) create mode 100644 src/Stratis.Bitcoin/Consensus/BlockNotFoundException.cs rename src/{Stratis.Bitcoin.Features.Consensus/CoinViews => Stratis.Bitcoin/Consensus}/CoinView.cs (98%) rename src/{Stratis.Bitcoin.Features.Consensus/CoinViews => Stratis.Bitcoin/Consensus}/FetchCoinsResponse.cs (95%) rename src/{Stratis.Bitcoin.Features.Consensus/CoinViews => Stratis.Bitcoin/Consensus}/IBackedCoinView.cs (89%) rename src/{Stratis.Bitcoin.Features.Consensus => Stratis.Bitcoin/Consensus}/IStakeChain.cs (92%) rename src/{Stratis.Bitcoin.Features.Consensus/Rules/CommonRules => Stratis.Bitcoin/Consensus/Rules}/CheckPosTransactionRule.cs (90%) rename src/{Stratis.Bitcoin.Features.Consensus/Rules/CommonRules => Stratis.Bitcoin/Consensus/Rules}/CheckPowTransactionRule.cs (97%) rename src/{Stratis.Bitcoin.Features.Consensus/Rules/CommonRules => Stratis.Bitcoin/Consensus/Rules}/CoinviewRule.cs (99%) rename src/{Stratis.Bitcoin.Features.Consensus/Rules/CommonRules => Stratis.Bitcoin/Consensus/Rules}/HeaderVersionRule.cs (94%) rename src/{Stratis.Bitcoin.Features.Consensus/Rules/CommonRules => Stratis.Bitcoin/Consensus/Rules}/PosFutureDriftRule.cs (93%) create mode 100644 src/Stratis.Bitcoin/Consensus/Rules/UtxoRuleContext.cs rename src/{Stratis.Bitcoin.Features.Consensus => Stratis.Bitcoin/Consensus}/UnspentOutputSet.cs (98%) diff --git a/src/Stratis.Bitcoin/Consensus/BlockNotFoundException.cs b/src/Stratis.Bitcoin/Consensus/BlockNotFoundException.cs new file mode 100644 index 00000000000..ec1066a2d3a --- /dev/null +++ b/src/Stratis.Bitcoin/Consensus/BlockNotFoundException.cs @@ -0,0 +1,11 @@ +using System; + +namespace Stratis.Bitcoin.Consensus +{ + public class BlockNotFoundException : Exception + { + public BlockNotFoundException(string message) : base(message) + { + } + } +} diff --git a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CoinView.cs b/src/Stratis.Bitcoin/Consensus/CoinView.cs similarity index 98% rename from src/Stratis.Bitcoin.Features.Consensus/CoinViews/CoinView.cs rename to src/Stratis.Bitcoin/Consensus/CoinView.cs index 82bc4599971..bcf37157663 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CoinView.cs +++ b/src/Stratis.Bitcoin/Consensus/CoinView.cs @@ -3,7 +3,7 @@ using NBitcoin; using Stratis.Bitcoin.Utilities; -namespace Stratis.Bitcoin.Features.Consensus.CoinViews +namespace Stratis.Bitcoin.Consensus { /// /// Database of UTXOs. diff --git a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/FetchCoinsResponse.cs b/src/Stratis.Bitcoin/Consensus/FetchCoinsResponse.cs similarity index 95% rename from src/Stratis.Bitcoin.Features.Consensus/CoinViews/FetchCoinsResponse.cs rename to src/Stratis.Bitcoin/Consensus/FetchCoinsResponse.cs index 3adad08f42d..06ea39cd8f5 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/FetchCoinsResponse.cs +++ b/src/Stratis.Bitcoin/Consensus/FetchCoinsResponse.cs @@ -1,7 +1,7 @@ using NBitcoin; using Stratis.Bitcoin.Utilities; -namespace Stratis.Bitcoin.Features.Consensus.CoinViews +namespace Stratis.Bitcoin.Consensus { /// /// Return value of , diff --git a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/IBackedCoinView.cs b/src/Stratis.Bitcoin/Consensus/IBackedCoinView.cs similarity index 89% rename from src/Stratis.Bitcoin.Features.Consensus/CoinViews/IBackedCoinView.cs rename to src/Stratis.Bitcoin/Consensus/IBackedCoinView.cs index b9e1721c270..710970088e7 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/IBackedCoinView.cs +++ b/src/Stratis.Bitcoin/Consensus/IBackedCoinView.cs @@ -1,4 +1,4 @@ -namespace Stratis.Bitcoin.Features.Consensus.CoinViews +namespace Stratis.Bitcoin.Consensus { /// /// Interface of coin views that are internally based on other, lower level, implementations of coin view. diff --git a/src/Stratis.Bitcoin.Features.Consensus/IStakeChain.cs b/src/Stratis.Bitcoin/Consensus/IStakeChain.cs similarity index 92% rename from src/Stratis.Bitcoin.Features.Consensus/IStakeChain.cs rename to src/Stratis.Bitcoin/Consensus/IStakeChain.cs index cf8534f0eb6..7ca2d88346f 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/IStakeChain.cs +++ b/src/Stratis.Bitcoin/Consensus/IStakeChain.cs @@ -1,6 +1,6 @@ using NBitcoin; -namespace Stratis.Bitcoin.Features.Consensus +namespace Stratis.Bitcoin.Consensus { /// /// An interface to read and write PoS information from store. diff --git a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/CheckPosTransactionRule.cs b/src/Stratis.Bitcoin/Consensus/Rules/CheckPosTransactionRule.cs similarity index 90% rename from src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/CheckPosTransactionRule.cs rename to src/Stratis.Bitcoin/Consensus/Rules/CheckPosTransactionRule.cs index 6478fb10990..72084174eef 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/CheckPosTransactionRule.cs +++ b/src/Stratis.Bitcoin/Consensus/Rules/CheckPosTransactionRule.cs @@ -1,10 +1,8 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using NBitcoin; -using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Consensus.Rules; -namespace Stratis.Bitcoin.Features.Consensus.Rules.CommonRules +namespace Stratis.Bitcoin.Consensus.Rules { /// Validate a PoS transaction. public class CheckPosTransactionRule : PartialValidationConsensusRule diff --git a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/CheckPowTransactionRule.cs b/src/Stratis.Bitcoin/Consensus/Rules/CheckPowTransactionRule.cs similarity index 97% rename from src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/CheckPowTransactionRule.cs rename to src/Stratis.Bitcoin/Consensus/Rules/CheckPowTransactionRule.cs index 66c57d2ddb5..e4e6ea449e9 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/CheckPowTransactionRule.cs +++ b/src/Stratis.Bitcoin/Consensus/Rules/CheckPowTransactionRule.cs @@ -2,10 +2,8 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using NBitcoin; -using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Consensus.Rules; -namespace Stratis.Bitcoin.Features.Consensus.Rules.CommonRules +namespace Stratis.Bitcoin.Consensus.Rules { /// Validate a PoW transaction. public class CheckPowTransactionRule : PartialValidationConsensusRule diff --git a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/CoinviewRule.cs b/src/Stratis.Bitcoin/Consensus/Rules/CoinviewRule.cs similarity index 99% rename from src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/CoinviewRule.cs rename to src/Stratis.Bitcoin/Consensus/Rules/CoinviewRule.cs index 10977e3a4c5..f728b933f74 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/CoinviewRule.cs +++ b/src/Stratis.Bitcoin/Consensus/Rules/CoinviewRule.cs @@ -3,11 +3,9 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Base.Deployments; -using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Utilities; -namespace Stratis.Bitcoin.Features.Consensus.Rules.CommonRules +namespace Stratis.Bitcoin.Consensus.Rules { /// /// The proof of work coinview update rules. Validates the UTXO set is correctly spent and creating new outputs. diff --git a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/HeaderVersionRule.cs b/src/Stratis.Bitcoin/Consensus/Rules/HeaderVersionRule.cs similarity index 94% rename from src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/HeaderVersionRule.cs rename to src/Stratis.Bitcoin/Consensus/Rules/HeaderVersionRule.cs index e8a63edec3c..cf0853ca3cc 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/HeaderVersionRule.cs +++ b/src/Stratis.Bitcoin/Consensus/Rules/HeaderVersionRule.cs @@ -1,8 +1,7 @@ using NBitcoin; using Stratis.Bitcoin.Base.Deployments; -using Stratis.Bitcoin.Consensus.Rules; -namespace Stratis.Bitcoin.Features.Consensus.Rules.CommonRules +namespace Stratis.Bitcoin.Consensus.Rules { /// A base skeleton class that is implemented by networks to define and verify the version of blocks. public abstract class HeaderVersionRule : HeaderValidationConsensusRule diff --git a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/PosFutureDriftRule.cs b/src/Stratis.Bitcoin/Consensus/Rules/PosFutureDriftRule.cs similarity index 93% rename from src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/PosFutureDriftRule.cs rename to src/Stratis.Bitcoin/Consensus/Rules/PosFutureDriftRule.cs index ad331eab19f..f03037522f2 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/Rules/CommonRules/PosFutureDriftRule.cs +++ b/src/Stratis.Bitcoin/Consensus/Rules/PosFutureDriftRule.cs @@ -1,10 +1,8 @@ using Microsoft.Extensions.Logging; using NBitcoin; -using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Utilities; -namespace Stratis.Bitcoin.Features.Consensus.Rules.CommonRules +namespace Stratis.Bitcoin.Consensus.Rules { /// /// A rule that will verify the block time drift is according to the PoS consensus rules for the network (and its test networks). @@ -54,12 +52,12 @@ public class PosFutureDriftRule : HeaderValidationConsensusRule protected const int FutureDriftSeconds = 15; /// Allow access to the POS parent. - protected PosConsensusRuleEngine PosParent; + protected ConsensusRuleEngine PosParent; /// public override void Initialize() { - this.PosParent = this.Parent as PosConsensusRuleEngine; + this.PosParent = this.Parent; Guard.NotNull(this.PosParent, nameof(this.PosParent)); } diff --git a/src/Stratis.Bitcoin/Consensus/Rules/UtxoRuleContext.cs b/src/Stratis.Bitcoin/Consensus/Rules/UtxoRuleContext.cs new file mode 100644 index 00000000000..44c5064bcd9 --- /dev/null +++ b/src/Stratis.Bitcoin/Consensus/Rules/UtxoRuleContext.cs @@ -0,0 +1,21 @@ +using System; + +namespace Stratis.Bitcoin.Consensus.Rules +{ + public abstract class UtxoRuleContext : RuleContext + { + protected UtxoRuleContext() + { + } + + protected UtxoRuleContext(ValidationContext validationContext, DateTimeOffset time) + : base(validationContext, time) + { + } + + /// + /// The UTXO that are representing the current validated block. + /// + public UnspentOutputSet UnspentOutputSet { get; set; } + } +} diff --git a/src/Stratis.Bitcoin.Features.Consensus/UnspentOutputSet.cs b/src/Stratis.Bitcoin/Consensus/UnspentOutputSet.cs similarity index 98% rename from src/Stratis.Bitcoin.Features.Consensus/UnspentOutputSet.cs rename to src/Stratis.Bitcoin/Consensus/UnspentOutputSet.cs index eda055be489..c8247dd84cb 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/UnspentOutputSet.cs +++ b/src/Stratis.Bitcoin/Consensus/UnspentOutputSet.cs @@ -3,7 +3,7 @@ using NBitcoin; using Stratis.Bitcoin.Utilities; -namespace Stratis.Bitcoin.Features.Consensus +namespace Stratis.Bitcoin.Consensus { public class UnspentOutputSet { From 50d38d17d4118b0f2d99662b6745fe2fd2a54bb8 Mon Sep 17 00:00:00 2001 From: quantumagi Date: Fri, 31 Jan 2020 22:13:32 +1100 Subject: [PATCH 2/6] Remove consensus dependency from projects --- src/Stratis.Benchmark/Stratis.Benchmark.csproj | 2 -- src/Stratis.Bitcoin.Api.Tests/Stratis.Bitcoin.Api.Tests.csproj | 2 -- .../Stratis.Bitcoin.Features.BlockStore.Tests.csproj | 1 - .../Stratis.Bitcoin.Features.Consensus.Tests.csproj | 1 - .../Stratis.Bitcoin.Features.MemoryPool.Tests.csproj | 1 - .../Stratis.Bitcoin.Features.MemoryPool.csproj | 1 - .../Stratis.Bitcoin.Features.Miner.csproj | 1 + .../Stratis.Bitcoin.Features.PoA.csproj | 1 - .../Stratis.Bitcoin.Features.RPC.csproj | 1 - .../Stratis.Bitcoin.Features.SmartContracts.Tests.csproj | 1 - .../Stratis.Bitcoin.Features.SmartContracts.csproj | 1 - .../Stratis.Bitcoin.IntegrationTests.Common.csproj | 1 - .../Stratis.Bitcoin.IntegrationTests.csproj | 1 - .../Stratis.Bitcoin.Tests.Common.csproj | 1 - src/Stratis.Bitcoin.Tests/Stratis.Bitcoin.Tests.csproj | 2 -- .../Stratis.SmartContracts.Core.csproj | 1 - .../Stratis.SmartContracts.Networks.csproj | 1 + 17 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/Stratis.Benchmark/Stratis.Benchmark.csproj b/src/Stratis.Benchmark/Stratis.Benchmark.csproj index 15132e8c288..cac842d1017 100644 --- a/src/Stratis.Benchmark/Stratis.Benchmark.csproj +++ b/src/Stratis.Benchmark/Stratis.Benchmark.csproj @@ -22,7 +22,6 @@ - @@ -32,7 +31,6 @@ - diff --git a/src/Stratis.Bitcoin.Api.Tests/Stratis.Bitcoin.Api.Tests.csproj b/src/Stratis.Bitcoin.Api.Tests/Stratis.Bitcoin.Api.Tests.csproj index 3f57cea1f3e..f59865b7471 100644 --- a/src/Stratis.Bitcoin.Api.Tests/Stratis.Bitcoin.Api.Tests.csproj +++ b/src/Stratis.Bitcoin.Api.Tests/Stratis.Bitcoin.Api.Tests.csproj @@ -20,8 +20,6 @@ - - diff --git a/src/Stratis.Bitcoin.Features.BlockStore.Tests/Stratis.Bitcoin.Features.BlockStore.Tests.csproj b/src/Stratis.Bitcoin.Features.BlockStore.Tests/Stratis.Bitcoin.Features.BlockStore.Tests.csproj index dea82b0088d..c50d6ec9c3f 100644 --- a/src/Stratis.Bitcoin.Features.BlockStore.Tests/Stratis.Bitcoin.Features.BlockStore.Tests.csproj +++ b/src/Stratis.Bitcoin.Features.BlockStore.Tests/Stratis.Bitcoin.Features.BlockStore.Tests.csproj @@ -37,7 +37,6 @@ - diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/Stratis.Bitcoin.Features.Consensus.Tests.csproj b/src/Stratis.Bitcoin.Features.Consensus.Tests/Stratis.Bitcoin.Features.Consensus.Tests.csproj index e3f9dda27a1..5db3aa95319 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/Stratis.Bitcoin.Features.Consensus.Tests.csproj +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/Stratis.Bitcoin.Features.Consensus.Tests.csproj @@ -36,7 +36,6 @@ - diff --git a/src/Stratis.Bitcoin.Features.MemoryPool.Tests/Stratis.Bitcoin.Features.MemoryPool.Tests.csproj b/src/Stratis.Bitcoin.Features.MemoryPool.Tests/Stratis.Bitcoin.Features.MemoryPool.Tests.csproj index 0d728d52416..8df754f088e 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool.Tests/Stratis.Bitcoin.Features.MemoryPool.Tests.csproj +++ b/src/Stratis.Bitcoin.Features.MemoryPool.Tests/Stratis.Bitcoin.Features.MemoryPool.Tests.csproj @@ -38,7 +38,6 @@ - diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/Stratis.Bitcoin.Features.MemoryPool.csproj b/src/Stratis.Bitcoin.Features.MemoryPool/Stratis.Bitcoin.Features.MemoryPool.csproj index 899851e4334..61566493956 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/Stratis.Bitcoin.Features.MemoryPool.csproj +++ b/src/Stratis.Bitcoin.Features.MemoryPool/Stratis.Bitcoin.Features.MemoryPool.csproj @@ -32,7 +32,6 @@ - diff --git a/src/Stratis.Bitcoin.Features.Miner/Stratis.Bitcoin.Features.Miner.csproj b/src/Stratis.Bitcoin.Features.Miner/Stratis.Bitcoin.Features.Miner.csproj index 72a1a3dd8f0..418c4f1d05b 100644 --- a/src/Stratis.Bitcoin.Features.Miner/Stratis.Bitcoin.Features.Miner.csproj +++ b/src/Stratis.Bitcoin.Features.Miner/Stratis.Bitcoin.Features.Miner.csproj @@ -33,6 +33,7 @@ + diff --git a/src/Stratis.Bitcoin.Features.PoA/Stratis.Bitcoin.Features.PoA.csproj b/src/Stratis.Bitcoin.Features.PoA/Stratis.Bitcoin.Features.PoA.csproj index 2112468e201..67d013ee6c8 100644 --- a/src/Stratis.Bitcoin.Features.PoA/Stratis.Bitcoin.Features.PoA.csproj +++ b/src/Stratis.Bitcoin.Features.PoA/Stratis.Bitcoin.Features.PoA.csproj @@ -25,7 +25,6 @@ - diff --git a/src/Stratis.Bitcoin.Features.RPC/Stratis.Bitcoin.Features.RPC.csproj b/src/Stratis.Bitcoin.Features.RPC/Stratis.Bitcoin.Features.RPC.csproj index 869cb4791bc..7c5db20d5e1 100644 --- a/src/Stratis.Bitcoin.Features.RPC/Stratis.Bitcoin.Features.RPC.csproj +++ b/src/Stratis.Bitcoin.Features.RPC/Stratis.Bitcoin.Features.RPC.csproj @@ -38,7 +38,6 @@ - diff --git a/src/Stratis.Bitcoin.Features.SmartContracts.Tests/Stratis.Bitcoin.Features.SmartContracts.Tests.csproj b/src/Stratis.Bitcoin.Features.SmartContracts.Tests/Stratis.Bitcoin.Features.SmartContracts.Tests.csproj index f2764797518..0899c274132 100644 --- a/src/Stratis.Bitcoin.Features.SmartContracts.Tests/Stratis.Bitcoin.Features.SmartContracts.Tests.csproj +++ b/src/Stratis.Bitcoin.Features.SmartContracts.Tests/Stratis.Bitcoin.Features.SmartContracts.Tests.csproj @@ -31,7 +31,6 @@ - diff --git a/src/Stratis.Bitcoin.Features.SmartContracts/Stratis.Bitcoin.Features.SmartContracts.csproj b/src/Stratis.Bitcoin.Features.SmartContracts/Stratis.Bitcoin.Features.SmartContracts.csproj index d6416aed054..afb3056d3ee 100644 --- a/src/Stratis.Bitcoin.Features.SmartContracts/Stratis.Bitcoin.Features.SmartContracts.csproj +++ b/src/Stratis.Bitcoin.Features.SmartContracts/Stratis.Bitcoin.Features.SmartContracts.csproj @@ -21,7 +21,6 @@ - diff --git a/src/Stratis.Bitcoin.IntegrationTests.Common/Stratis.Bitcoin.IntegrationTests.Common.csproj b/src/Stratis.Bitcoin.IntegrationTests.Common/Stratis.Bitcoin.IntegrationTests.Common.csproj index 33058f6f343..f4432b3d028 100644 --- a/src/Stratis.Bitcoin.IntegrationTests.Common/Stratis.Bitcoin.IntegrationTests.Common.csproj +++ b/src/Stratis.Bitcoin.IntegrationTests.Common/Stratis.Bitcoin.IntegrationTests.Common.csproj @@ -22,7 +22,6 @@ - diff --git a/src/Stratis.Bitcoin.IntegrationTests/Stratis.Bitcoin.IntegrationTests.csproj b/src/Stratis.Bitcoin.IntegrationTests/Stratis.Bitcoin.IntegrationTests.csproj index 31f9b736e5c..fc6849a3c3f 100644 --- a/src/Stratis.Bitcoin.IntegrationTests/Stratis.Bitcoin.IntegrationTests.csproj +++ b/src/Stratis.Bitcoin.IntegrationTests/Stratis.Bitcoin.IntegrationTests.csproj @@ -41,7 +41,6 @@ - diff --git a/src/Stratis.Bitcoin.Tests.Common/Stratis.Bitcoin.Tests.Common.csproj b/src/Stratis.Bitcoin.Tests.Common/Stratis.Bitcoin.Tests.Common.csproj index 21f6a3dfbad..1b50b284dc2 100644 --- a/src/Stratis.Bitcoin.Tests.Common/Stratis.Bitcoin.Tests.Common.csproj +++ b/src/Stratis.Bitcoin.Tests.Common/Stratis.Bitcoin.Tests.Common.csproj @@ -28,7 +28,6 @@ - diff --git a/src/Stratis.Bitcoin.Tests/Stratis.Bitcoin.Tests.csproj b/src/Stratis.Bitcoin.Tests/Stratis.Bitcoin.Tests.csproj index 5c2599c8ee7..76d2a026c46 100644 --- a/src/Stratis.Bitcoin.Tests/Stratis.Bitcoin.Tests.csproj +++ b/src/Stratis.Bitcoin.Tests/Stratis.Bitcoin.Tests.csproj @@ -38,11 +38,9 @@ - - diff --git a/src/Stratis.SmartContracts.Core/Stratis.SmartContracts.Core.csproj b/src/Stratis.SmartContracts.Core/Stratis.SmartContracts.Core.csproj index f83dd03c319..6e4c6fc7e4e 100644 --- a/src/Stratis.SmartContracts.Core/Stratis.SmartContracts.Core.csproj +++ b/src/Stratis.SmartContracts.Core/Stratis.SmartContracts.Core.csproj @@ -25,7 +25,6 @@ - diff --git a/src/Stratis.SmartContracts.Networks/Stratis.SmartContracts.Networks.csproj b/src/Stratis.SmartContracts.Networks/Stratis.SmartContracts.Networks.csproj index 7ba52eba206..e9ac27ecdc2 100644 --- a/src/Stratis.SmartContracts.Networks/Stratis.SmartContracts.Networks.csproj +++ b/src/Stratis.SmartContracts.Networks/Stratis.SmartContracts.Networks.csproj @@ -16,6 +16,7 @@ + From d60c80da8c560b680979ef919c160133bd489c7b Mon Sep 17 00:00:00 2001 From: quantumagi Date: Fri, 31 Jan 2020 22:15:16 +1100 Subject: [PATCH 3/6] Create separate files for classes --- .../RuleContextOverrides.cs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/Stratis.Bitcoin.Features.Consensus/RuleContextOverrides.cs b/src/Stratis.Bitcoin.Features.Consensus/RuleContextOverrides.cs index 31445a6c726..23097dbb1a0 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/RuleContextOverrides.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/RuleContextOverrides.cs @@ -6,23 +6,6 @@ namespace Stratis.Bitcoin.Features.Consensus { - public abstract class UtxoRuleContext : RuleContext - { - protected UtxoRuleContext() - { - } - - protected UtxoRuleContext(ValidationContext validationContext, DateTimeOffset time) - : base(validationContext, time) - { - } - - /// - /// The UTXO that are representing the current validated block. - /// - public UnspentOutputSet UnspentOutputSet { get; set; } - } - /// /// A context that is used by the for the PoS network type. /// From 740fcd9bf0736edabc6a84b654c960cb6c80ac45 Mon Sep 17 00:00:00 2001 From: quantumagi Date: Fri, 31 Jan 2020 22:17:33 +1100 Subject: [PATCH 4/6] Remove mempool's consensus feature dependency --- src/Stratis.Bitcoin.Features.MemoryPool/MempoolFeature.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/MempoolFeature.cs b/src/Stratis.Bitcoin.Features.MemoryPool/MempoolFeature.cs index ab27096055f..26a66a285c9 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/MempoolFeature.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool/MempoolFeature.cs @@ -8,7 +8,6 @@ using Stratis.Bitcoin.Builder.Feature; using Stratis.Bitcoin.Configuration.Logging; using Stratis.Bitcoin.Connection; -using Stratis.Bitcoin.Features.Consensus; using Stratis.Bitcoin.Features.MemoryPool.Fee; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Interfaces; @@ -153,7 +152,6 @@ public static IFullNodeBuilder UseMempool(this IFullNodeBuilder fullNodeBuilder) { features .AddFeature() - .DependOn() .FeatureServices(services => { services.AddSingleton(); From c61b091be9a897abbb7c09500e7231668c9481eb Mon Sep 17 00:00:00 2001 From: quantumagi Date: Fri, 31 Jan 2020 22:21:26 +1100 Subject: [PATCH 5/6] Update "using" statements --- .../CoinViews/CoinViewStackTest.cs | 1 + .../CoinViews/CoinviewTests.cs | 1 + .../CoinViews/FetchCoinsResponseTest.cs | 2 +- .../CoinViews/RewindDataIndexCacheTest.cs | 2 +- .../Rules/CommonRules/CheckPowTransactionRuleTest.cs | 2 +- .../Rules/CommonRules/PosColdStakingRuleTest.cs | 1 + .../Rules/CommonRules/PosFutureDriftRuleTest.cs | 2 +- .../Rules/CommonRules/PosTimeMaskRuleTest.cs | 1 + .../Rules/CommonRules/RulesRegistrationOrderTest.cs | 2 +- .../CoinViews/CachedCoinView.cs | 1 + .../CoinViews/CoinViewStack.cs | 1 + .../CoinViews/DBCoinView.cs | 1 + .../CoinViews/InMemoryCoinView.cs | 1 + .../CoinviewPrefetcher.cs | 1 + src/Stratis.Bitcoin.Features.Consensus/ConsensusQuery.cs | 2 +- .../ProvenBlockHeaders/IRewindDataIndexCache.cs | 2 +- .../Rules/ProvenHeaderRules/ProvenHeaderCoinstakeRule.cs | 1 - src/Stratis.Bitcoin.Features.Consensus/StakeChainStore.cs | 1 + src/Stratis.Bitcoin.Features.Consensus/StakeValidator.cs | 1 - .../MempoolManagerTest.cs | 2 +- .../Interfaces/ITxMempool.cs | 2 +- src/Stratis.Bitcoin.Features.MemoryPool/MemPoolCoinView.cs | 4 +--- src/Stratis.Bitcoin.Features.MemoryPool/MempoolManager.cs | 2 +- src/Stratis.Bitcoin.Features.MemoryPool/MempoolOrphans.cs | 2 +- src/Stratis.Bitcoin.Features.MemoryPool/MempoolValidator.cs | 3 +-- .../Rules/CheckAllInputsMempoolRule.cs | 2 +- .../Rules/CreateMempoolEntryMempoolRule.cs | 2 +- src/Stratis.Bitcoin.Features.MemoryPool/TxMemPool.cs | 2 +- src/Stratis.Bitcoin.Features.Miner/BlockDefinition.cs | 2 +- src/Stratis.Bitcoin.Features.Miner/PosBlockDefinition.cs | 3 +-- src/Stratis.Bitcoin.Features.Miner/PosPowBlockDefinition.cs | 3 +-- src/Stratis.Bitcoin.Features.Miner/Staking/PosMinting.cs | 1 - src/Stratis.Bitcoin.Features.PoA/PoANetwork.cs | 1 + .../Controllers/FullNodeController.cs | 1 - src/Stratis.Bitcoin.Features.RPC/RPCFeature.cs | 4 ---- src/Stratis.Bitcoin.Features.RPC/RPCMiddleware.cs | 1 - .../SmartContractTransactionServiceTests.cs | 1 - .../PoA/Rules/SmartContractPoACoinviewRule.cs | 2 +- .../PoS/Rules/SmartContractPosCoinviewRule.cs | 1 - .../PoS/SmartContractPosPowBlockDefinition.cs | 2 -- .../PoW/Rules/SmartContractPowCoinviewRule.cs | 3 +-- .../Extensions/CoreNodeExtensions.cs | 2 +- src/Stratis.Bitcoin.IntegrationTests/CoinViewTester.cs | 2 +- src/Stratis.Bitcoin.Networks/BitcoinMain.cs | 1 + src/Stratis.Bitcoin.Networks/StratisMain.cs | 1 + src/Stratis.Bitcoin.Tests/Consensus/TestInMemoryCoinView.cs | 2 +- .../P2P/EnforcePeerVersionCheckBehaviorTests.cs | 6 ------ .../Mempool/TokenlessMemPool.cs | 2 +- src/Stratis.Sidechains.Networks/CirrusMain.cs | 1 + src/Stratis.Sidechains.Networks/CirrusRegTest.cs | 1 + src/Stratis.Sidechains.Networks/CirrusTest.cs | 1 + .../SenderRetrieverTests.cs | 2 +- src/Stratis.SmartContracts.Core/Extensions.cs | 2 +- src/Stratis.SmartContracts.Core/Util/ISenderRetriever.cs | 2 +- src/Stratis.SmartContracts.Core/Util/SenderRetriever.cs | 2 +- .../SmartContractPosRegTest.cs | 1 + .../SmartContractsPoARegTest.cs | 1 + .../SmartContractsRegTest.cs | 1 + 58 files changed, 48 insertions(+), 54 deletions(-) diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/CoinViewStackTest.cs b/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/CoinViewStackTest.cs index c09e0b34ac2..eed3d086623 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/CoinViewStackTest.cs +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/CoinViewStackTest.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Threading; using NBitcoin; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Utilities; using Xunit; diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/CoinviewTests.cs b/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/CoinviewTests.cs index c5fa1e7d834..10c63da06ea 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/CoinviewTests.cs +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/CoinviewTests.cs @@ -7,6 +7,7 @@ using Stratis.Bitcoin.Configuration; using Stratis.Bitcoin.Configuration.Logging; using Stratis.Bitcoin.Configuration.Settings; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Features.Consensus.ProvenBlockHeaders; using Stratis.Bitcoin.Networks; diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/FetchCoinsResponseTest.cs b/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/FetchCoinsResponseTest.cs index 0f4e0ecea64..14fec08ed1d 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/FetchCoinsResponseTest.cs +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/FetchCoinsResponseTest.cs @@ -1,5 +1,5 @@ using NBitcoin; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Utilities; using Xunit; diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/RewindDataIndexCacheTest.cs b/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/RewindDataIndexCacheTest.cs index 698aabe7331..cde7903b3ed 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/RewindDataIndexCacheTest.cs +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/CoinViews/RewindDataIndexCacheTest.cs @@ -5,8 +5,8 @@ using Moq; using NBitcoin; using NBitcoin.BitcoinCore; -using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Features.Consensus.ProvenBlockHeaders; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Networks; using Stratis.Bitcoin.Tests.Common; using Stratis.Bitcoin.Tests.Common.Logging; diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/CheckPowTransactionRuleTest.cs b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/CheckPowTransactionRuleTest.cs index 24b954123b2..0fa8d9db879 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/CheckPowTransactionRuleTest.cs +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/CheckPowTransactionRuleTest.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using NBitcoin; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; +using Stratis.Bitcoin.Consensus.Rules; using Xunit; namespace Stratis.Bitcoin.Features.Consensus.Tests.Rules.CommonRules diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosColdStakingRuleTest.cs b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosColdStakingRuleTest.cs index b1ee5ca703f..bbe04a73ec6 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosColdStakingRuleTest.cs +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosColdStakingRuleTest.cs @@ -2,6 +2,7 @@ using System.Threading.Tasks; using NBitcoin; using Stratis.Bitcoin.Consensus; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Tests.Common; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosFutureDriftRuleTest.cs b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosFutureDriftRuleTest.cs index 51dfceee92b..bc5372ba22b 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosFutureDriftRuleTest.cs +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosFutureDriftRuleTest.cs @@ -1,6 +1,6 @@ using NBitcoin; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; +using Stratis.Bitcoin.Consensus.Rules; using Xunit; namespace Stratis.Bitcoin.Features.Consensus.Tests.Rules.CommonRules diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosTimeMaskRuleTest.cs b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosTimeMaskRuleTest.cs index 69ea244e71a..f549fda7174 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosTimeMaskRuleTest.cs +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/PosTimeMaskRuleTest.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks; using NBitcoin; using Stratis.Bitcoin.Consensus; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Xunit; diff --git a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/RulesRegistrationOrderTest.cs b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/RulesRegistrationOrderTest.cs index 3f7a9862ab9..23c84f05761 100644 --- a/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/RulesRegistrationOrderTest.cs +++ b/src/Stratis.Bitcoin.Features.Consensus.Tests/Rules/CommonRules/RulesRegistrationOrderTest.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using FluentAssertions; using NBitcoin; -using NBitcoin.Rules; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.Consensus.Rules.ProvenHeaderRules; using Stratis.Bitcoin.Networks; diff --git a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CachedCoinView.cs b/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CachedCoinView.cs index 0149524d9f3..8a5b304ecc9 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CachedCoinView.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CachedCoinView.cs @@ -7,6 +7,7 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Configuration.Settings; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.Consensus.ProvenBlockHeaders; using Stratis.Bitcoin.Utilities; using TracerAttributes; diff --git a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CoinViewStack.cs b/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CoinViewStack.cs index 4455e767093..7fc91458236 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CoinViewStack.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/CoinViews/CoinViewStack.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Utilities; namespace Stratis.Bitcoin.Features.Consensus.CoinViews diff --git a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/DBCoinView.cs b/src/Stratis.Bitcoin.Features.Consensus/CoinViews/DBCoinView.cs index 5114e15eede..94b94ca1c1c 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/DBCoinView.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/CoinViews/DBCoinView.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging; using NBitcoin; using NBitcoin.BitcoinCore; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Interfaces; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/InMemoryCoinView.cs b/src/Stratis.Bitcoin.Features.Consensus/CoinViews/InMemoryCoinView.cs index 7420bed833a..21e99bbb348 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/CoinViews/InMemoryCoinView.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/CoinViews/InMemoryCoinView.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Threading; using NBitcoin; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Utilities; using ReaderWriterLock = NBitcoin.ReaderWriterLock; diff --git a/src/Stratis.Bitcoin.Features.Consensus/CoinviewPrefetcher.cs b/src/Stratis.Bitcoin.Features.Consensus/CoinviewPrefetcher.cs index 92d86e965a4..4ebf37dc427 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/CoinviewPrefetcher.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/CoinviewPrefetcher.cs @@ -6,6 +6,7 @@ using NBitcoin; using Stratis.Bitcoin.AsyncWork; using Stratis.Bitcoin.Base.Deployments; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.Consensus.CoinViews; namespace Stratis.Bitcoin.Features.Consensus diff --git a/src/Stratis.Bitcoin.Features.Consensus/ConsensusQuery.cs b/src/Stratis.Bitcoin.Features.Consensus/ConsensusQuery.cs index 8a8b1ad9e2b..36ec3191e19 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/ConsensusQuery.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/ConsensusQuery.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Base; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Interfaces; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.Consensus/ProvenBlockHeaders/IRewindDataIndexCache.cs b/src/Stratis.Bitcoin.Features.Consensus/ProvenBlockHeaders/IRewindDataIndexCache.cs index 3c4b977aeba..9699ea7c0de 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/ProvenBlockHeaders/IRewindDataIndexCache.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/ProvenBlockHeaders/IRewindDataIndexCache.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; namespace Stratis.Bitcoin.Features.Consensus.ProvenBlockHeaders { diff --git a/src/Stratis.Bitcoin.Features.Consensus/Rules/ProvenHeaderRules/ProvenHeaderCoinstakeRule.cs b/src/Stratis.Bitcoin.Features.Consensus/Rules/ProvenHeaderRules/ProvenHeaderCoinstakeRule.cs index e8d84e44392..f4c960f6d48 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/Rules/ProvenHeaderRules/ProvenHeaderCoinstakeRule.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/Rules/ProvenHeaderRules/ProvenHeaderCoinstakeRule.cs @@ -1,7 +1,6 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Features.Consensus.Interfaces; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.Consensus/StakeChainStore.cs b/src/Stratis.Bitcoin.Features.Consensus/StakeChainStore.cs index 57f0ca0c02b..ddbca123c51 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/StakeChainStore.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/StakeChainStore.cs @@ -5,6 +5,7 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Configuration; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.Consensus/StakeValidator.cs b/src/Stratis.Bitcoin.Features.Consensus/StakeValidator.cs index 154ace98cbc..f31487d5e29 100644 --- a/src/Stratis.Bitcoin.Features.Consensus/StakeValidator.cs +++ b/src/Stratis.Bitcoin.Features.Consensus/StakeValidator.cs @@ -7,7 +7,6 @@ using NBitcoin.BouncyCastle.Math; using NBitcoin.Crypto; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Features.Consensus.Interfaces; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.MemoryPool.Tests/MempoolManagerTest.cs b/src/Stratis.Bitcoin.Features.MemoryPool.Tests/MempoolManagerTest.cs index fe264036b96..738324a0cb9 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool.Tests/MempoolManagerTest.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool.Tests/MempoolManagerTest.cs @@ -4,7 +4,7 @@ using Moq; using NBitcoin; using Stratis.Bitcoin.Configuration; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.MemoryPool.Fee; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Tests.Common; diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/Interfaces/ITxMempool.cs b/src/Stratis.Bitcoin.Features.MemoryPool/Interfaces/ITxMempool.cs index ce72dbf2fc1..18ee0906078 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/Interfaces/ITxMempool.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool/Interfaces/ITxMempool.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.MemoryPool.Fee; using static Stratis.Bitcoin.Features.MemoryPool.TxMempool; diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/MemPoolCoinView.cs b/src/Stratis.Bitcoin.Features.MemoryPool/MemPoolCoinView.cs index 0e936561ade..c7ef3bd1fcf 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/MemPoolCoinView.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool/MemPoolCoinView.cs @@ -2,10 +2,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading; -using System.Threading.Tasks; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/MempoolManager.cs b/src/Stratis.Bitcoin.Features.MemoryPool/MempoolManager.cs index 7cc99e48ebd..6ab1434ecad 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/MempoolManager.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool/MempoolManager.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Interfaces; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/MempoolOrphans.cs b/src/Stratis.Bitcoin.Features.MemoryPool/MempoolOrphans.cs index 553b524ceed..ad6dff89ea1 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/MempoolOrphans.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool/MempoolOrphans.cs @@ -4,8 +4,8 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using NBitcoin; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.EventBus.CoreEvents; -using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.P2P.Peer; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/MempoolValidator.cs b/src/Stratis.Bitcoin.Features.MemoryPool/MempoolValidator.cs index a976f3bace3..ebd958848cf 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/MempoolValidator.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool/MempoolValidator.cs @@ -8,8 +8,7 @@ using Stratis.Bitcoin.Base.Deployments; using Stratis.Bitcoin.Configuration; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus.CoinViews; -using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/Rules/CheckAllInputsMempoolRule.cs b/src/Stratis.Bitcoin.Features.MemoryPool/Rules/CheckAllInputsMempoolRule.cs index ca3412e4f8f..c489e1f788d 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/Rules/CheckAllInputsMempoolRule.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool/Rules/CheckAllInputsMempoolRule.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; namespace Stratis.Bitcoin.Features.MemoryPool.Rules diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/Rules/CreateMempoolEntryMempoolRule.cs b/src/Stratis.Bitcoin.Features.MemoryPool/Rules/CreateMempoolEntryMempoolRule.cs index c9ed4af8601..f3f5cf12f2f 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/Rules/CreateMempoolEntryMempoolRule.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool/Rules/CreateMempoolEntryMempoolRule.cs @@ -4,7 +4,7 @@ using NBitcoin; using Stratis.Bitcoin.Base.Deployments; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.Bitcoin.Features.MemoryPool/TxMemPool.cs b/src/Stratis.Bitcoin.Features.MemoryPool/TxMemPool.cs index d4524821c40..25fa5dca8ea 100644 --- a/src/Stratis.Bitcoin.Features.MemoryPool/TxMemPool.cs +++ b/src/Stratis.Bitcoin.Features.MemoryPool/TxMemPool.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Configuration; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.MemoryPool.Fee; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Signals; diff --git a/src/Stratis.Bitcoin.Features.Miner/BlockDefinition.cs b/src/Stratis.Bitcoin.Features.Miner/BlockDefinition.cs index 8c6d1b43e08..54c4fce9cb9 100644 --- a/src/Stratis.Bitcoin.Features.Miner/BlockDefinition.cs +++ b/src/Stratis.Bitcoin.Features.Miner/BlockDefinition.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.MemoryPool; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Features.Miner.Comparers; diff --git a/src/Stratis.Bitcoin.Features.Miner/PosBlockDefinition.cs b/src/Stratis.Bitcoin.Features.Miner/PosBlockDefinition.cs index 15c7b874fb8..b78d2542e11 100644 --- a/src/Stratis.Bitcoin.Features.Miner/PosBlockDefinition.cs +++ b/src/Stratis.Bitcoin.Features.Miner/PosBlockDefinition.cs @@ -1,9 +1,8 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Interfaces; -using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Mining; diff --git a/src/Stratis.Bitcoin.Features.Miner/PosPowBlockDefinition.cs b/src/Stratis.Bitcoin.Features.Miner/PosPowBlockDefinition.cs index 237f55831ff..77facdc2b4e 100644 --- a/src/Stratis.Bitcoin.Features.Miner/PosPowBlockDefinition.cs +++ b/src/Stratis.Bitcoin.Features.Miner/PosPowBlockDefinition.cs @@ -1,9 +1,8 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Interfaces; -using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; using Stratis.Bitcoin.Mining; diff --git a/src/Stratis.Bitcoin.Features.Miner/Staking/PosMinting.cs b/src/Stratis.Bitcoin.Features.Miner/Staking/PosMinting.cs index e34267e8523..d9df1cf1e1e 100644 --- a/src/Stratis.Bitcoin.Features.Miner/Staking/PosMinting.cs +++ b/src/Stratis.Bitcoin.Features.Miner/Staking/PosMinting.cs @@ -12,7 +12,6 @@ using Stratis.Bitcoin.Base; using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.Consensus; -using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Features.Consensus.Interfaces; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool; diff --git a/src/Stratis.Bitcoin.Features.PoA/PoANetwork.cs b/src/Stratis.Bitcoin.Features.PoA/PoANetwork.cs index b71a4742efc..4c8a5dee783 100644 --- a/src/Stratis.Bitcoin.Features.PoA/PoANetwork.cs +++ b/src/Stratis.Bitcoin.Features.PoA/PoANetwork.cs @@ -3,6 +3,7 @@ using System.Linq; using NBitcoin; using NBitcoin.DataEncoders; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool.Rules; using Stratis.Bitcoin.Features.PoA.BasePoAFeatureConsensusRules; diff --git a/src/Stratis.Bitcoin.Features.RPC/Controllers/FullNodeController.cs b/src/Stratis.Bitcoin.Features.RPC/Controllers/FullNodeController.cs index 19a90062a1d..1f6faa8a268 100644 --- a/src/Stratis.Bitcoin.Features.RPC/Controllers/FullNodeController.cs +++ b/src/Stratis.Bitcoin.Features.RPC/Controllers/FullNodeController.cs @@ -13,7 +13,6 @@ using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Controllers; using Stratis.Bitcoin.Controllers.Models; -using Stratis.Bitcoin.Features.Consensus; using Stratis.Bitcoin.Features.RPC.Exceptions; using Stratis.Bitcoin.Features.RPC.ModelBinders; using Stratis.Bitcoin.Features.RPC.Models; diff --git a/src/Stratis.Bitcoin.Features.RPC/RPCFeature.cs b/src/Stratis.Bitcoin.Features.RPC/RPCFeature.cs index 5a8e138c9c8..ff3a4a9f52d 100644 --- a/src/Stratis.Bitcoin.Features.RPC/RPCFeature.cs +++ b/src/Stratis.Bitcoin.Features.RPC/RPCFeature.cs @@ -9,9 +9,6 @@ using Stratis.Bitcoin.Builder.Feature; using Stratis.Bitcoin.Configuration; using Stratis.Bitcoin.Configuration.Logging; -using Stratis.Bitcoin.Connection; -using Stratis.Bitcoin.Features.Consensus; -using Stratis.Bitcoin.Features.RPC.Controllers; namespace Stratis.Bitcoin.Features.RPC { @@ -128,7 +125,6 @@ public static IFullNodeBuilder AddRPC(this IFullNodeBuilder fullNodeBuilder) { features .AddFeature() - .DependOn() .FeatureServices(services => services.AddSingleton(fullNodeBuilder)); }); diff --git a/src/Stratis.Bitcoin.Features.RPC/RPCMiddleware.cs b/src/Stratis.Bitcoin.Features.RPC/RPCMiddleware.cs index da304628d8d..a7e6c9de0c1 100644 --- a/src/Stratis.Bitcoin.Features.RPC/RPCMiddleware.cs +++ b/src/Stratis.Bitcoin.Features.RPC/RPCMiddleware.cs @@ -13,7 +13,6 @@ using Newtonsoft.Json.Linq; using Stratis.Bitcoin.Configuration; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus; using Stratis.Bitcoin.Features.RPC.Exceptions; using Stratis.Bitcoin.Utilities; using TracerAttributes; diff --git a/src/Stratis.Bitcoin.Features.SmartContracts.Tests/SmartContractTransactionServiceTests.cs b/src/Stratis.Bitcoin.Features.SmartContracts.Tests/SmartContractTransactionServiceTests.cs index 251eda7ed95..8752a410e40 100644 --- a/src/Stratis.Bitcoin.Features.SmartContracts.Tests/SmartContractTransactionServiceTests.cs +++ b/src/Stratis.Bitcoin.Features.SmartContracts.Tests/SmartContractTransactionServiceTests.cs @@ -8,7 +8,6 @@ using Stratis.Bitcoin.Features.Wallet; using Stratis.Bitcoin.Features.Wallet.Interfaces; using Stratis.Bitcoin.Features.Wallet.Models; -using Stratis.Sidechains.Networks; using Stratis.SmartContracts.CLR; using Stratis.SmartContracts.CLR.Serialization; using Stratis.SmartContracts.Core.State; diff --git a/src/Stratis.Bitcoin.Features.SmartContracts/PoA/Rules/SmartContractPoACoinviewRule.cs b/src/Stratis.Bitcoin.Features.SmartContracts/PoA/Rules/SmartContractPoACoinviewRule.cs index 813a5cd059f..b352709b7c9 100644 --- a/src/Stratis.Bitcoin.Features.SmartContracts/PoA/Rules/SmartContractPoACoinviewRule.cs +++ b/src/Stratis.Bitcoin.Features.SmartContracts/PoA/Rules/SmartContractPoACoinviewRule.cs @@ -2,8 +2,8 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Base.Deployments; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Consensus.Rules; -using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Features.PoA.BasePoAFeatureConsensusRules; using Stratis.Bitcoin.Features.SmartContracts.Caching; using Stratis.Bitcoin.Features.SmartContracts.Rules; diff --git a/src/Stratis.Bitcoin.Features.SmartContracts/PoS/Rules/SmartContractPosCoinviewRule.cs b/src/Stratis.Bitcoin.Features.SmartContracts/PoS/Rules/SmartContractPosCoinviewRule.cs index ed82009ca99..442ed376d59 100644 --- a/src/Stratis.Bitcoin.Features.SmartContracts/PoS/Rules/SmartContractPosCoinviewRule.cs +++ b/src/Stratis.Bitcoin.Features.SmartContracts/PoS/Rules/SmartContractPosCoinviewRule.cs @@ -6,7 +6,6 @@ using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus; -using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Features.Consensus.Interfaces; using Stratis.Bitcoin.Features.SmartContracts.Caching; using Stratis.Bitcoin.Features.SmartContracts.Rules; diff --git a/src/Stratis.Bitcoin.Features.SmartContracts/PoS/SmartContractPosPowBlockDefinition.cs b/src/Stratis.Bitcoin.Features.SmartContracts/PoS/SmartContractPosPowBlockDefinition.cs index a7d5c4fff34..b4715aee8bc 100644 --- a/src/Stratis.Bitcoin.Features.SmartContracts/PoS/SmartContractPosPowBlockDefinition.cs +++ b/src/Stratis.Bitcoin.Features.SmartContracts/PoS/SmartContractPosPowBlockDefinition.cs @@ -3,8 +3,6 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus; -using Stratis.Bitcoin.Features.Consensus.CoinViews; using Stratis.Bitcoin.Features.Consensus.Interfaces; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool; diff --git a/src/Stratis.Bitcoin.Features.SmartContracts/PoW/Rules/SmartContractPowCoinviewRule.cs b/src/Stratis.Bitcoin.Features.SmartContracts/PoW/Rules/SmartContractPowCoinviewRule.cs index e3f79788955..30b352b7c88 100644 --- a/src/Stratis.Bitcoin.Features.SmartContracts/PoW/Rules/SmartContractPowCoinviewRule.cs +++ b/src/Stratis.Bitcoin.Features.SmartContracts/PoW/Rules/SmartContractPowCoinviewRule.cs @@ -1,7 +1,6 @@ using Microsoft.Extensions.Logging; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.SmartContracts.Caching; using Stratis.Bitcoin.Features.SmartContracts.Rules; using Stratis.SmartContracts.CLR; diff --git a/src/Stratis.Bitcoin.IntegrationTests.Common/Extensions/CoreNodeExtensions.cs b/src/Stratis.Bitcoin.IntegrationTests.Common/Extensions/CoreNodeExtensions.cs index 5535e6d72fa..52e246ed3a6 100644 --- a/src/Stratis.Bitcoin.IntegrationTests.Common/Extensions/CoreNodeExtensions.cs +++ b/src/Stratis.Bitcoin.IntegrationTests.Common/Extensions/CoreNodeExtensions.cs @@ -2,7 +2,7 @@ using System.Linq; using NBitcoin; using Stratis.Bitcoin.Consensus; -using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.IntegrationTests.Common.EnvironmentMockUpHelpers; namespace Stratis.Bitcoin.IntegrationTests diff --git a/src/Stratis.Bitcoin.IntegrationTests/CoinViewTester.cs b/src/Stratis.Bitcoin.IntegrationTests/CoinViewTester.cs index 734aa0ffd9c..9f6f27e17c8 100644 --- a/src/Stratis.Bitcoin.IntegrationTests/CoinViewTester.cs +++ b/src/Stratis.Bitcoin.IntegrationTests/CoinViewTester.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Utilities; namespace Stratis.Bitcoin.IntegrationTests diff --git a/src/Stratis.Bitcoin.Networks/BitcoinMain.cs b/src/Stratis.Bitcoin.Networks/BitcoinMain.cs index 37c25da5704..6a55afa179e 100644 --- a/src/Stratis.Bitcoin.Networks/BitcoinMain.cs +++ b/src/Stratis.Bitcoin.Networks/BitcoinMain.cs @@ -3,6 +3,7 @@ using System.Linq; using NBitcoin; using NBitcoin.DataEncoders; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool.Rules; using Stratis.Bitcoin.Networks.Deployments; diff --git a/src/Stratis.Bitcoin.Networks/StratisMain.cs b/src/Stratis.Bitcoin.Networks/StratisMain.cs index bd493696895..01200353b2b 100644 --- a/src/Stratis.Bitcoin.Networks/StratisMain.cs +++ b/src/Stratis.Bitcoin.Networks/StratisMain.cs @@ -5,6 +5,7 @@ using NBitcoin.BouncyCastle.Math; using NBitcoin.DataEncoders; using NBitcoin.Protocol; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.Consensus.Rules.ProvenHeaderRules; using Stratis.Bitcoin.Features.MemoryPool.Rules; diff --git a/src/Stratis.Bitcoin.Tests/Consensus/TestInMemoryCoinView.cs b/src/Stratis.Bitcoin.Tests/Consensus/TestInMemoryCoinView.cs index 3c5996621cb..fb3b1ade770 100644 --- a/src/Stratis.Bitcoin.Tests/Consensus/TestInMemoryCoinView.cs +++ b/src/Stratis.Bitcoin.Tests/Consensus/TestInMemoryCoinView.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Threading; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Utilities; using ReaderWriterLock = NBitcoin.ReaderWriterLock; diff --git a/src/Stratis.Bitcoin.Tests/P2P/EnforcePeerVersionCheckBehaviorTests.cs b/src/Stratis.Bitcoin.Tests/P2P/EnforcePeerVersionCheckBehaviorTests.cs index 3ca08dbc864..2942b217538 100644 --- a/src/Stratis.Bitcoin.Tests/P2P/EnforcePeerVersionCheckBehaviorTests.cs +++ b/src/Stratis.Bitcoin.Tests/P2P/EnforcePeerVersionCheckBehaviorTests.cs @@ -1,23 +1,17 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Moq; using NBitcoin; using NBitcoin.Protocol; -using Stratis.Bitcoin.BlockPulling; using Stratis.Bitcoin.Configuration; using Stratis.Bitcoin.Configuration.Logging; -using Stratis.Bitcoin.Interfaces; using Stratis.Bitcoin.P2P.Peer; using Stratis.Bitcoin.P2P.Protocol; using Stratis.Bitcoin.P2P.Protocol.Behaviors; using Stratis.Bitcoin.P2P.Protocol.Payloads; using Stratis.Bitcoin.Tests.Common; using Stratis.Bitcoin.Tests.Common.Logging; -using Stratis.Bitcoin.Utilities; -using Stratis.Sidechains.Networks; using Xunit; namespace Stratis.Bitcoin.Tests.BlockPulling diff --git a/src/Stratis.Feature.PoA.Tokenless/Mempool/TokenlessMemPool.cs b/src/Stratis.Feature.PoA.Tokenless/Mempool/TokenlessMemPool.cs index fba2dc19be3..26efcd27a16 100644 --- a/src/Stratis.Feature.PoA.Tokenless/Mempool/TokenlessMemPool.cs +++ b/src/Stratis.Feature.PoA.Tokenless/Mempool/TokenlessMemPool.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging; using NBitcoin; using Stratis.Bitcoin.Configuration; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.MemoryPool; using Stratis.Bitcoin.Features.MemoryPool.Fee; using Stratis.Bitcoin.Features.MemoryPool.Interfaces; diff --git a/src/Stratis.Sidechains.Networks/CirrusMain.cs b/src/Stratis.Sidechains.Networks/CirrusMain.cs index 13ec80c4aea..af6f7164086 100644 --- a/src/Stratis.Sidechains.Networks/CirrusMain.cs +++ b/src/Stratis.Sidechains.Networks/CirrusMain.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NBitcoin; using NBitcoin.DataEncoders; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool.Rules; using Stratis.Bitcoin.Features.PoA; diff --git a/src/Stratis.Sidechains.Networks/CirrusRegTest.cs b/src/Stratis.Sidechains.Networks/CirrusRegTest.cs index 5220d07613f..6b7c40b9f81 100644 --- a/src/Stratis.Sidechains.Networks/CirrusRegTest.cs +++ b/src/Stratis.Sidechains.Networks/CirrusRegTest.cs @@ -4,6 +4,7 @@ using NBitcoin; using NBitcoin.DataEncoders; using NBitcoin.Protocol; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool.Rules; using Stratis.Bitcoin.Features.PoA; diff --git a/src/Stratis.Sidechains.Networks/CirrusTest.cs b/src/Stratis.Sidechains.Networks/CirrusTest.cs index f8ab07499e6..ba569f0d7e8 100644 --- a/src/Stratis.Sidechains.Networks/CirrusTest.cs +++ b/src/Stratis.Sidechains.Networks/CirrusTest.cs @@ -3,6 +3,7 @@ using NBitcoin; using NBitcoin.DataEncoders; using NBitcoin.Protocol; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool.Rules; using Stratis.Bitcoin.Features.PoA; diff --git a/src/Stratis.SmartContracts.Core.Tests/SenderRetrieverTests.cs b/src/Stratis.SmartContracts.Core.Tests/SenderRetrieverTests.cs index 0b60c5e3990..9666df1e540 100644 --- a/src/Stratis.SmartContracts.Core.Tests/SenderRetrieverTests.cs +++ b/src/Stratis.SmartContracts.Core.Tests/SenderRetrieverTests.cs @@ -2,7 +2,7 @@ using System.Threading; using Moq; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Utilities; using Stratis.SmartContracts.Core.Util; using Stratis.SmartContracts.Networks; diff --git a/src/Stratis.SmartContracts.Core/Extensions.cs b/src/Stratis.SmartContracts.Core/Extensions.cs index aef9c9c174b..875696576cf 100644 --- a/src/Stratis.SmartContracts.Core/Extensions.cs +++ b/src/Stratis.SmartContracts.Core/Extensions.cs @@ -1,6 +1,6 @@ using System; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Utilities; namespace Stratis.SmartContracts.Core diff --git a/src/Stratis.SmartContracts.Core/Util/ISenderRetriever.cs b/src/Stratis.SmartContracts.Core/Util/ISenderRetriever.cs index adeceb396b3..aa9c7321e81 100644 --- a/src/Stratis.SmartContracts.Core/Util/ISenderRetriever.cs +++ b/src/Stratis.SmartContracts.Core/Util/ISenderRetriever.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.MemoryPool; namespace Stratis.SmartContracts.Core.Util diff --git a/src/Stratis.SmartContracts.Core/Util/SenderRetriever.cs b/src/Stratis.SmartContracts.Core/Util/SenderRetriever.cs index 079b715380b..e5376bf2484 100644 --- a/src/Stratis.SmartContracts.Core/Util/SenderRetriever.cs +++ b/src/Stratis.SmartContracts.Core/Util/SenderRetriever.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; using NBitcoin; -using Stratis.Bitcoin.Features.Consensus.CoinViews; +using Stratis.Bitcoin.Consensus; using Stratis.Bitcoin.Features.MemoryPool; using Stratis.Bitcoin.Utilities; diff --git a/src/Stratis.SmartContracts.Networks/SmartContractPosRegTest.cs b/src/Stratis.SmartContracts.Networks/SmartContractPosRegTest.cs index d0b0eeaafe5..bcca2b10736 100644 --- a/src/Stratis.SmartContracts.Networks/SmartContractPosRegTest.cs +++ b/src/Stratis.SmartContracts.Networks/SmartContractPosRegTest.cs @@ -4,6 +4,7 @@ using NBitcoin.BouncyCastle.Math; using NBitcoin.DataEncoders; using NBitcoin.Protocol; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool.Rules; using Stratis.Bitcoin.Features.SmartContracts.MempoolRules; diff --git a/src/Stratis.SmartContracts.Networks/SmartContractsPoARegTest.cs b/src/Stratis.SmartContracts.Networks/SmartContractsPoARegTest.cs index a1192ffce12..204d841433c 100644 --- a/src/Stratis.SmartContracts.Networks/SmartContractsPoARegTest.cs +++ b/src/Stratis.SmartContracts.Networks/SmartContractsPoARegTest.cs @@ -3,6 +3,7 @@ using NBitcoin; using NBitcoin.DataEncoders; using NBitcoin.Protocol; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool.Rules; using Stratis.Bitcoin.Features.PoA; diff --git a/src/Stratis.SmartContracts.Networks/SmartContractsRegTest.cs b/src/Stratis.SmartContracts.Networks/SmartContractsRegTest.cs index cea04c1edc5..efd87390a8f 100644 --- a/src/Stratis.SmartContracts.Networks/SmartContractsRegTest.cs +++ b/src/Stratis.SmartContracts.Networks/SmartContractsRegTest.cs @@ -3,6 +3,7 @@ using NBitcoin; using NBitcoin.DataEncoders; using NBitcoin.Protocol; +using Stratis.Bitcoin.Consensus.Rules; using Stratis.Bitcoin.Features.Consensus.Rules.CommonRules; using Stratis.Bitcoin.Features.MemoryPool.Rules; using Stratis.Bitcoin.Features.SmartContracts; From 96eb8ffd000aa0a6bb5e32472b590a87afff1692 Mon Sep 17 00:00:00 2001 From: quantumagi Date: Sun, 2 Feb 2020 16:53:41 +1100 Subject: [PATCH 6/6] Remove moved class --- .../BlockNotFoundException.cs | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 src/Stratis.Bitcoin.Features.Consensus/BlockNotFoundException.cs diff --git a/src/Stratis.Bitcoin.Features.Consensus/BlockNotFoundException.cs b/src/Stratis.Bitcoin.Features.Consensus/BlockNotFoundException.cs deleted file mode 100644 index a26cc499796..00000000000 --- a/src/Stratis.Bitcoin.Features.Consensus/BlockNotFoundException.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace Stratis.Bitcoin.Features.Consensus -{ - public class BlockNotFoundException : Exception - { - public BlockNotFoundException(string message) : base(message) - { - } - } -}