public override void BuildNode() { var settings = new NodeSettings(this.Network, args: new string[] { "-conf=stratis.conf", "-datadir=" + this.DataFolder }); IFullNodeBuilder builder = new FullNodeBuilder() .UseNodeSettings(settings) .UseBlockStore() .UseMempool() .AddRPC() .AddSmartContracts() .UseSmartContractPowConsensus() .UseSmartContractWallet() .UseSmartContractPowMining() .UseReflectionExecutor() .MockIBD() .UseTestChainedHeaderTree(); if (!this.EnablePeerDiscovery) { builder.RemoveImplementation <PeerConnectorDiscovery>(); builder.ReplaceService <IPeerDiscovery, BaseFeature>(new PeerDiscoveryDisabled()); } this.FullNode = (FullNode)builder.Build(); }
public override void BuildNode() { var argsAsStringArray = this.configParameters.AsConsoleArgArray(); NodeSettings settings = null; if (string.IsNullOrEmpty(this.Agent)) { settings = new NodeSettings(this.Network, this.protocolVersion, args: argsAsStringArray) { MinProtocolVersion = this.minProtocolVersion } } ; else { settings = new NodeSettings(this.Network, this.protocolVersion, this.Agent, argsAsStringArray) { MinProtocolVersion = this.minProtocolVersion } }; IFullNodeBuilder builder = new FullNodeBuilder().UseNodeSettings(settings); this.callback(builder); builder.RemoveImplementation <PeerConnectorDiscovery>(); builder.ReplaceService <IPeerDiscovery, BaseFeature>(new PeerDiscoveryDisabled()); this.FullNode = (FullNode)builder.Build(); } }
public override void BuildNode() { var settings = new NodeSettings(this.Network, args: new string[] { "-conf=poa.conf", "-datadir=" + this.DataFolder }); IFullNodeBuilder builder = new FullNodeBuilder() .UseNodeSettings(settings) .UseBlockStore() .UseMempool() .AddRPC() .AddSmartContracts(options => { options.UseReflectionExecutor(); }) .UseSmartContractPoAConsensus() .UseSmartContractPoAMining() .UseSmartContractWallet() .AddSQLiteWalletRepository() .ReplaceTimeProvider(this.timeProvider) .MockIBD() .AddFastMiningCapability(); if (!this.EnablePeerDiscovery) { builder.RemoveImplementation <PeerConnectorDiscovery>(); builder.ReplaceService <IPeerDiscovery, BaseFeature>(new PeerDiscoveryDisabled()); } this.FullNode = (FullNode)builder.Build(); }
public override void BuildNode() { var settings = new NodeSettings(this.Network, ProtocolVersion.PROVEN_HEADER_VERSION, this.Agent, args: new string[] { $"-conf={this.Network.DefaultConfigFilename}", "-datadir=" + this.DataFolder }); var builder = new FullNodeBuilder() .UseNodeSettings(settings) .UseBlockStore() .UsePosConsensus() .UseMempool() .UseWallet() .AddSQLiteWalletRepository() .AddPowPosMining(!(this.Network is StratisMain || this.Network is StratisTest || this.Network is StratisRegTest)) .AddRPC() .UseApi() .UseTestChainedHeaderTree() .MockIBD(); if (this.OverrideDateTimeProvider) { builder.OverrideDateTimeProviderFor <MiningFeature>(); } if (this.AddRewardClaimer) { builder.AddService <BaseFeature, RewardClaimer>(); } if (!this.EnablePeerDiscovery) { builder.RemoveImplementation <PeerConnectorDiscovery>(); builder.ReplaceService <IPeerDiscovery, BaseFeature>(new PeerDiscoveryDisabled()); } this.FullNode = (FullNode)builder.Build(); }
public override void BuildNode() { var settings = new NodeSettings(this.Network, ProtocolVersion.PROVEN_HEADER_VERSION, this.Agent, args: new string[] { "-conf=stratis.conf", "-datadir=" + this.DataFolder }); // For stratisX tests we need the minimum protocol version to be 70000. settings.MinProtocolVersion = ProtocolVersion.ALT_PROTOCOL_VERSION; var builder = new FullNodeBuilder() .UseNodeSettings(settings) .UseBlockStore() .UsePosConsensus() .UseMempool() .UseWallet() .AddPowPosMining() .AddRPC() .UseApi() .UseTestChainedHeaderTree() .MockIBD(); if (this.OverrideDateTimeProvider) { builder.OverrideDateTimeProviderFor <MiningFeature>(); } if (!this.EnablePeerDiscovery) { builder.RemoveImplementation <PeerConnectorDiscovery>(); builder.ReplaceService <IPeerDiscovery, BaseFeature>(new PeerDiscoveryDisabled()); } this.FullNode = (FullNode)builder.Build(); }
public override void BuildNode() { NodeSettings settings = null; if (string.IsNullOrEmpty(this.Agent)) { settings = new NodeSettings(this.Network, args: new string[] { "-conf=bitcoin.conf", "-datadir=" + this.DataFolder }); } else { settings = new NodeSettings(this.Network, agent: this.Agent, args: new string[] { "-conf=bitcoin.conf", "-datadir=" + this.DataFolder }); } var persistenceProviderManager = new TestPersistenceProviderManager(settings); var builder = new FullNodeBuilder() .UsePersistenceProviderMananger(persistenceProviderManager) .UseNodeSettings(settings) .UseBlockStore() .UsePowConsensus() .UseMempool() .AddMining() .UseWallet() .AddRPC() .UseNodeHost() .UseTestChainedHeaderTree() .MockIBD(); if (this.ServiceToOverride != null) { builder.OverrideService <BaseFeature>(this.ServiceToOverride); } if (!this.EnablePeerDiscovery) { builder.RemoveImplementation <PeerConnectorDiscovery>(); builder.ReplaceService <IPeerDiscovery, BaseFeature>(new PeerDiscoveryDisabled()); } if (this.AlwaysFlushBlocks) { builder.ReplaceService <IBlockStoreQueueFlushCondition, BlockStoreFeature>(new BlockStoreAlwaysFlushCondition()); } this.FullNode = (FullNode)builder.Build(); }
public override void BuildNode() { NodeSettings settings = null; if (string.IsNullOrEmpty(this.Agent)) { settings = new NodeSettings(this.Network, args: new string[] { "-conf=bitcoin.conf", "-datadir=" + this.DataFolder }); } else { settings = new NodeSettings(this.Network, agent: this.Agent, args: new string[] { "-conf=bitcoin.conf", "-datadir=" + this.DataFolder }); } var builder = new FullNodeBuilder() .UseNodeSettings(settings) .UseBlockStore() .UsePowConsensus() .UseMempool() .AddMining() .UseWallet() .AddRPC() .UseApi() .UseTestChainedHeaderTree() .MockIBD(); if (this.InterceptorDisconnect != null) { builder = builder.InterceptBlockDisconnected(this.InterceptorDisconnect); } if (this.ServiceToOverride != null) { builder.OverrideService <BaseFeature>(this.ServiceToOverride); } if (!this.EnablePeerDiscovery) { builder.RemoveImplementation <PeerConnectorDiscovery>(); builder.ReplaceService <IPeerDiscovery>(new PeerDiscoveryDisabled()); } this.FullNode = (FullNode)builder.Build(); }
public override void BuildNode() { var settings = new NodeSettings(this.Network, ProtocolVersion.PROVEN_HEADER_VERSION, this.Agent, args: new string[] { "-savetrxhex=1", "-txIndex=1", "-addressIndex=1", "-conf=redstone.conf", $"-datadir={this.DataFolder}" }); var builder = new FullNodeBuilder() .UseNodeSettings(settings) .UseBlockStore() .UseRedstonePosConsensus() .UseMempool() .UseBlockNotification() .UseTransactionNotification() .UseWallet() .UseWatchOnlyWallet() .AddServiceNodeRegistration() .AddRedstoneMining() .AddRPC() .UseApi() .UseTestChainedHeaderTree() .MockIBD(); if (this.OverrideDateTimeProvider) { builder.OverrideDateTimeProviderFor <MiningFeature>(); } if (!this.EnablePeerDiscovery) { builder.RemoveImplementation <PeerConnectorDiscovery>(); builder.ReplaceService <IPeerDiscovery, BaseFeature>(new PeerDiscoveryDisabled()); } this.FullNode = (FullNode)builder.Build(); }