Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cirrus Seeder #425

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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