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

Commit

Permalink
Simulation/testnet1 fresh (#31)
Browse files Browse the repository at this point in the history
* - first dasboard commit
- upgraded correctly BitcoinD to dotnetcore 1.1
- wired Dashboard in BitcoinD (actually listen on port 5000)

* removed typescript references and files

* removed wwwroot/app folder

* NodeSettings page

* freegeoip integration wip

* wip

* wip

* - first dasboard commit
- upgraded correctly BitcoinD to dotnetcore 1.1
- wired Dashboard in BitcoinD (actually listen on port 5000)

* removed typescript references and files

* freegeoip integration wip

* wip

* wip
  • Loading branch information
MithrilMan authored and dangershony committed Mar 6, 2017
1 parent 37a6c23 commit 19b579c
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 1,333 deletions.
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

0 comments on commit 19b579c

Please sign in to comment.