Skip to content

Commit

Permalink
Fix Seeder (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
fassadlr committed Feb 15, 2021
1 parent 3426491 commit aba3b96
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/Stratis.CirrusDnsD/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Stratis.Bitcoin;
using Stratis.Bitcoin.Builder;
using Stratis.Bitcoin.Configuration;
using Stratis.Bitcoin.Consensus;
using Stratis.Bitcoin.Features.Api;
using Stratis.Bitcoin.Features.BlockStore;
using Stratis.Bitcoin.Features.Dns;
Expand All @@ -12,8 +13,10 @@
using Stratis.Bitcoin.Features.SmartContracts;
using Stratis.Bitcoin.Features.SmartContracts.PoA;
using Stratis.Bitcoin.Features.SmartContracts.Wallet;
using Stratis.Bitcoin.Networks;
using Stratis.Bitcoin.Utilities;
using Stratis.Features.Collateral;
using Stratis.Features.Collateral.CounterChain;
using Stratis.Features.SQLiteWalletRepository;
using Stratis.Sidechains.Networks;

Expand Down Expand Up @@ -67,26 +70,32 @@ public static async Task Main(string[] args)

private static IFullNode GetSideChainFullNode(NodeSettings nodeSettings)
{
IFullNode node = new FullNodeBuilder()
.UseNodeSettings(nodeSettings)
.UseBlockStore()
DbType dbType = nodeSettings.GetDbType();

IFullNodeBuilder nodeBuilder = new FullNodeBuilder()
.UseNodeSettings(nodeSettings, dbType)
.UseBlockStore(dbType)
.UseMempool()
.AddSmartContracts(options =>
{
options.UseReflectionExecutor();
options.UsePoAWhitelistedContracts();
})
.AddPoAFeature()
.UsePoAConsensus()
.UsePoAConsensus(dbType)
.CheckCollateralCommitment()

// This needs to be set so that we can check the magic bytes during the Strat to Strax changeover.
// Perhaps we can introduce a block height check rather?
.SetCounterChainNetwork(StraxNetwork.MainChainNetworks[nodeSettings.Network.NetworkType]())

.UseSmartContractWallet()
.AddSQLiteWalletRepository()
.UseApi()
.AddRPC()
.UseDns()
.Build();
.UseDns();

return node;
return nodeBuilder.Build();
}

private static IFullNode GetDnsNode(NodeSettings nodeSettings)
Expand Down
1 change: 1 addition & 0 deletions src/Stratis.CirrusDnsD/Stratis.CirrusDnsD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ItemGroup>
<ProjectReference Include="..\Stratis.Bitcoin.Features.Api\Stratis.Bitcoin.Features.Api.csproj" />
<ProjectReference Include="..\Stratis.Bitcoin.Features.Dns\Stratis.Bitcoin.Features.Dns.csproj" />
<ProjectReference Include="..\Stratis.Bitcoin.Networks\Stratis.Bitcoin.Networks.csproj" />
<ProjectReference Include="..\Stratis.Bitcoin\Stratis.Bitcoin.csproj" />
<ProjectReference Include="..\Stratis.Features.Collateral\Stratis.Features.Collateral.csproj" />
<ProjectReference Include="..\Stratis.Features.SQLiteWalletRepository\Stratis.Features.SQLiteWalletRepository.csproj" />
Expand Down

0 comments on commit aba3b96

Please sign in to comment.