Skip to content

Commit f2f5efc

Browse files
committed
Refactor x42 network definition to have correct namespace
- Move all x42 network definition code to be under "Blokcore.Networks". - This fixes a minor issue with excessive logging.
1 parent 5d6bbd4 commit f2f5efc

16 files changed

Lines changed: 44 additions & 61 deletions

src/Networks/Blockcore.Networks.x42/Networks/Consensus/x42Consensus.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using NBitcoin;
66
using NBitcoin.BouncyCastle.Math;
77

8-
namespace x42.Networks.Consensus
8+
namespace Blockcore.Networks.x42.Networks.Consensus
99
{
1010
public class x42Consensus : IConsensus
1111
{

src/Networks/Blockcore.Networks.x42/Networks/Consensus/x42ConsensusErrors.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Blockcore.Consensus;
22

3-
namespace x42.Networks.Consensus
3+
namespace Blockcore.Networks.x42.Networks.Consensus
44
{
55
public static class x42ConsensusErrors
66
{

src/Networks/Blockcore.Networks.x42/Networks/Consensus/x42PosConsensusOptions.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
using Blockcore.Consensus;
2-
using Blockcore.Networks;
3-
using NBitcoin;
42

5-
namespace x42.Networks.Consensus
3+
namespace Blockcore.Networks.x42.Networks.Consensus
64
{
75
public class x42PosConsensusOptions : PosConsensusOptions
86
{

src/Networks/Blockcore.Networks.x42/Networks/Deployments/x42BIP9Deployments.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
using Blockcore.Base.Deployments;
22
using Blockcore.Consensus.ScriptInfo;
33
using Blockcore.Consensus.TransactionInfo;
4-
using NBitcoin;
54

6-
namespace x42.Networks.Deployments
5+
namespace Blockcore.Networks.x42.Networks.Deployments
76
{
8-
/// <summary>
9-
/// BIP9 deployments for the Blockcore sample coin network.
10-
/// </summary>
11-
public class x42BIP9Deployments : BIP9DeploymentsArray
7+
/// <summary>
8+
/// BIP9 deployments for the Blockcore sample coin network.
9+
/// </summary>
10+
public class x42BIP9Deployments : BIP9DeploymentsArray
1211
{
1312
// The position of each deployment in the deployments array. Note that this is decoupled from the actual position of the flag bit for the deployment in the block version.
1413
public const int TestDummy = 0;

src/Networks/Blockcore.Networks.x42/Networks/Networks.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
using Blockcore.Networks;
2-
using NBitcoin;
3-
4-
namespace x42.Networks
1+
namespace Blockcore.Networks.x42.Networks
52
{
6-
public static class Networks
3+
public static class Networks
74
{
85
public static NetworksSelector x42
96
{

src/Networks/Blockcore.Networks.x42/Networks/Policies/x42StandardScriptsRegistry.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
using System.Linq;
33
using Blockcore.Consensus.ScriptInfo;
44
using Blockcore.Consensus.TransactionInfo;
5-
using Blockcore.Networks;
6-
using NBitcoin;
75
using NBitcoin.BitcoinCore;
86

9-
namespace x42.Networks.Policies
7+
namespace Blockcore.Networks.x42.Networks.Policies
108
{
119
/// <summary>
1210
/// x42 coin-specific standard transaction definitions.

src/Networks/Blockcore.Networks.x42/Networks/Rules/x42HeaderVersionRule.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
using Blockcore.Features.Consensus.Rules.CommonRules;
55
using Blockcore.Utilities;
66
using Microsoft.Extensions.Logging;
7-
using NBitcoin;
87

9-
namespace x42.Networks.Rules
8+
namespace Blockcore.Networks.x42.Networks.Rules
109
{
1110
/// <summary>
1211
/// Checks if <see cref="x42Main"/> network block's header has a valid block version.

src/Networks/Blockcore.Networks.x42/Networks/Rules/x42OpReturnFeeMempoolRule.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
using Blockcore.Features.MemoryPool;
66
using Blockcore.Features.MemoryPool.Interfaces;
77
using Blockcore.Features.MemoryPool.Rules;
8-
using Blockcore.Networks;
98
using Microsoft.Extensions.Logging;
109
using NBitcoin;
1110

12-
namespace x42.Networks.Consensus.Rules
11+
namespace Blockcore.Networks.x42.Networks.Consensus.Rules
1312
{
1413
/// <summary>
1514
/// Verify the OP_RETURN fee.

src/Networks/Blockcore.Networks.x42/Networks/Rules/x42PosCoinviewRule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using Blockcore.Features.Consensus.Rules.UtxosetRules;
2+
using Blockcore.Networks.x42.Networks.Consensus;
23
using NBitcoin;
3-
using x42.Networks.Consensus;
44

5-
namespace x42.Networks.Rules
5+
namespace Blockcore.Networks.x42.Networks.Rules
66
{
77
public sealed class x42PosCoinviewRule : CheckPosUtxosetRule
88
{

src/Networks/Blockcore.Networks.x42/Networks/Setup/CoinSetup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Blockcore.Consensus.Checkpoints;
44
using NBitcoin;
55

6-
namespace x42.Networks.Setup
6+
namespace Blockcore.Networks.x42.Networks.Setup
77
{
88
internal class CoinSetup
99
{

0 commit comments

Comments
 (0)