Commit ea68e8bc authored by Sergei Zubov's avatar Sergei Zubov

Modify DeStream Breeze node

parent 2616cb0a
using System;
using System.Linq;
using System.Threading.Tasks;
using DeStream.Stratis.Bitcoin.Configuration;
using NBitcoin;
using NBitcoin.Protocol;
using Stratis.Bitcoin;
using Stratis.Bitcoin.Builder;
using Stratis.Bitcoin.Configuration;
using Stratis.Bitcoin.Features.Api;
using Stratis.Bitcoin.Features.LightWallet;
using Stratis.Bitcoin.Features.Notifications;
using Stratis.Bitcoin.Utilities;
using DeStream.Stratis.Bitcoin.Configuration;
namespace DeStream.BreezeD
{
public class Program
......@@ -27,26 +25,14 @@ namespace DeStream.BreezeD
try
{
// Get the API uri.
var isTestNet = args.Contains("-testnet");
var isDeStream= args.Contains("destream");
var agent = "Breeze";
DeStreamNodeSettings nodeSettings;
Network network = args.Contains("-testnet") ? Network.DeStreamTest : Network.DeStreamMain;
if (isDeStream)
{
Network network = isTestNet ? Network.DeStreamTest : Network.DeStreamMain;
nodeSettings = new DeStreamNodeSettings(network, ProtocolVersion.ALT_PROTOCOL_VERSION, agent, args:args, loadConfiguration:false);
}
else
{
nodeSettings = new DeStreamNodeSettings(agent: agent, args: args, loadConfiguration:false);
}
var nodeSettings = new DeStreamNodeSettings(network, ProtocolVersion.ALT_PROTOCOL_VERSION, args: args,
loadConfiguration: false);
IFullNodeBuilder fullNodeBuilder = new FullNodeBuilder()
.UseNodeSettings(nodeSettings)
.UseLightWallet()
.UseDeStreamLightWallet()
.UseBlockNotification()
.UseTransactionNotification()
.UseApi();
......@@ -63,4 +49,4 @@ namespace DeStream.BreezeD
}
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment