Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Simulation/testnet1 fresh #31

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
29 changes: 0 additions & 29 deletions Stratis.BitcoinD/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,6 @@ public static void Main(string[] args)
{
IsBackground = true //so the process terminate
}.Start();
if (args.Any(a => a.Contains("mine")))
{
new Thread(() =>
{
Thread.Sleep(10000); // let the node start

while (!node.IsDisposed)
{
Thread.Sleep(1000); // wait 1 sec

// generate 1 block
node.Miner.GenerateBlocks(new Stratis.Bitcoin.Miner.ReserveScript()
{
reserveSfullNodecript = new NBitcoin.Key().ScriptPubKey
}, 1, 100000000, false);

Console.WriteLine("mined tip at: " + node?.Chain.Tip.Height);
}
})
{
IsBackground = true //so the process terminate
}.Start();

}

node.Start();

#if DEBUG
Expand All @@ -71,10 +46,6 @@ public static void Main(string[] args)
webWallet.Start();

node.WaitDisposed();




node.Dispose();
}
}
Expand Down
27 changes: 27 additions & 0 deletions Stratis.Dashboard/HtmlHelpers/PrettyfyExtension.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Microsoft.AspNetCore.Mvc.Rendering;

namespace Stratis.Dashboard.HtmlHelpers {
public static class PrettyfyExtension {
public static string PrettySize(this IHtmlHelper helper, long size) {
string postfix = "Bytes";
long result = size;
//more than 1 GB
if (size >= 1073741824) {
result = size / 1073741824;
postfix = "GB";
}
//more that 1 MB
else if (size >= 1048576) {
result = size / 1048576;
postfix = "MB";
}
//more that 1 KB
else if (size >= 1024) {
result = size / 1024;
postfix = "KB";
}

return result.ToString("F1") + " " + postfix;
}
}
}
19 changes: 0 additions & 19 deletions Stratis.Dashboard/Properties/PublishProfiles/file-publish.ps1

This file was deleted.

19 changes: 0 additions & 19 deletions Stratis.Dashboard/Properties/PublishProfiles/file.pubxml

This file was deleted.

Loading