Skip to content

Commit

Permalink
Merge pull request #402 from CoiniumServ/develop
Browse files Browse the repository at this point in the history
sync 0.1.3-alpha to master
  • Loading branch information
Hüseyin Uslu committed Sep 3, 2014
2 parents 41ed39d + 485bfe1 commit 01e8582
Show file tree
Hide file tree
Showing 301 changed files with 3,489 additions and 2,340 deletions.
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "deps/gibbed.io"]
path = deps/gibbed.io
url = https://github.com/CoiniumServ/Gibbed.IO.git
[submodule "deps/jsonconfig"]
path = deps/jsonconfig
url = https://github.com/CoiniumServ/JsonConfig.git
[submodule "deps/csredis"]
path = deps/csredis
url = https://github.com/CoiniumServ/csredis.git
25 changes: 25 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
##### [v0.1.3 alpha - Piri Reis](https://github.com/CoiniumServ/CoiniumServ/releases/tag/v0.1.3-alpha) - 03.09.2014

**Storage**
* Implemented storage layers support; hybrid-storage (redis+mysql) and mpos compatibility (mysql).
* Major changes in storage configuration - you need to update per-pool configuration files.
* Added migration support, CoiniumServ will manage required tables on it's own in hybrid-storage mode.

**Coin**
* Fixed a bug with coin's that was returning non-standard version reply in getinfo().
* Added initial proof-of-stake coin support.
* Added automatic detection support for proof-of-stake coins.

**Statistics & API**
* Re-developed statistics & api sub-system from stratch.
* Pool api now can expose more details.
* Fixed a bug where authenticated miner count was reported incorrectly.

**Web**
* Improved index page layout.

**Misc**
* Updated dependency packages.
* File path handling improvements.
* Fixed app.config.

##### [v0.1.2 alpha - Piri Reis](https://github.com/CoiniumServ/CoiniumServ/releases/tag/v0.1.2-alpha) - 14.08.2014

**Payments**
Expand Down
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# ![Screenshot](http://coinium.org/assets/images/logo/coinium-icon-48.png) CoiniumServ [![Build Status](https://travis-ci.org/CoiniumServ/CoiniumServ.svg?branch=develop)](https://travis-ci.org/CoiniumServ/CoiniumServ) [![Build status](https://ci.appveyor.com/api/projects/status/3x349ig9dt14943t)](https://ci.appveyor.com/project/raistlinthewiz/coiniumserv)

[CoiniumServ](https://github.com/CoiniumServ/CoiniumServ) is an high performance, extremely efficient, platform-agnostic, easy to setup pool server implementation. It features a stratum and vanilla services, reward / payment / share processors, user-friendly front-end website and a full-stack API.
[CoiniumServ](https://github.com/CoiniumServ/CoiniumServ) is a high performance, extremely efficient, platform-agnostic, easy to setup pool server implementation. It features stratum and vanilla services, reward, payment, share processors, vardiff & ban managers, user-friendly embedded web-server & front-end and a full-stack API.

CoiniumServ was created to be used for [Coinium.org](http://www.coinium.org) mining pool network at first hand. You can check [some of pools](https://github.com/CoiniumServ/CoiniumServ/wiki/Pools) of the pools running CoiniumServ.

* Official pools: [coinium.org](http://www.coinium.org)

![CoiniumServ running over mono & ubuntu](http://i.imgur.com/izIB5nq.png)
![CoiniumServ running over mono & ubuntu](http://i.imgur.com/HvaPVrZ.png)

### Support

Expand All @@ -15,6 +15,7 @@ Start by reading our [FAQ](https://github.com/CoiniumServ/CoiniumServ/wiki/FAQ)
You can also use our [issues](https://github.com/CoiniumServ/CoiniumServ/issues) page to report bugs.

* Official site: [coiniumserv.com](http://www.coiniumserv.com)
* [Paid support & consulting options](https://github.com/CoiniumServ/CoiniumServ#consulting)
* [Support forums](http://forum.coinium.org/forum/19-support/)
* IRC (**irc.freenode.net**):
- **#coiniumserv** [user support](http://webchat.freenode.net/?channels=%23coiniumserv&prompt=1&uio=OT10cnVlde)
Expand Down Expand Up @@ -68,19 +69,20 @@ Can run on these platforms;
###### Multiplexed Structure
* Multiple pools & ports.
* Multiple coin daemon connection support.
* Multiple database layers.
* Multiple storage layers.

###### Functionality
* Stratum server (over TCP sockets).
* Stratum show_message support (MOTD & messages).
* Vanilla server (getwork over http server). [experimental]
* Daemon RPC interface.
* Storage layers support
* Block template / job managment.
* Generation transaction builder.
* Share processor.
* Payment processor.
* Proof of Work (PoW) and Proof of Stake (PoS) [in-development] support.
* Transaction messages support [in-development].
* Proof of Work (PoW) and Proof of Stake (PoS) support.
* Transaction messages support.
* Vardiff support.
* Ban manager support that can handles miners flooding with invalid shares.
* Embedded web-server & front-end
Expand Down Expand Up @@ -111,6 +113,13 @@ _Under Development_
*__NIST5__
*__Qubit__
*__Hefty1__

###### Persistance & Storage Layers

CoiniumServ supports storage layer interfaces that you can extend to implement your own persistance logic. By default, it supports two layers; a high performance hybrid layer and mpos compatibility layer.

* __Hybrid Layer__: a custom hybrid layer that utilizes redis + mysql together that is carefully designed for high performance persistance support.
* __MPOS Layer__: a compatibility layer based on mysql that supports MPOS whenever you want payments to be handled by MPOS.

###### Development Model
* Strictly [follows](https://github.com/CoiniumServ/CoiniumServ/tree/develop/src/Tests) the [Test Driven Development](http://en.wikipedia.org/wiki/Test-driven_development) model. We have implemented extensive [tests](https://github.com/CoiniumServ/CoiniumServ/tree/develop/src/Tests) for all important functionality and never merge in code that breaks tests and stuff. Yet again, when a new functionality is introduced we also expect proper tests to be implemented within the PR. In simple words, most probably you won't notice any functionality-breaking changes within the repository.
Expand Down Expand Up @@ -140,10 +149,14 @@ Start reading by these;
* [Developer's Guide](https://github.com/CoiniumServ/CoiniumServ/wiki/Developer's-Guide)
* [Technical Documentation](https://github.com/CoiniumServ/CoiniumServ/wiki/Technical-Documentation)

### Consulting

Additional to free [support](https://github.com/CoiniumServ/CoiniumServ#support) methods, we offer paid remote support & consulting services for whom would like to get professional support. Contact us over [here](http://blog.coinium.org/coiniumserv/consulting/) and we will get back to you to discuss your needs.

### License

Copyright (C) 2013 - 2014, CoiniumServ Project - http://www.coinium.org -
http://www.coiniumserv.com - https://github.com/CoiniumServ/CoiniumServ
http://www.coiniumserv.com

This software is dual-licensed: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
40 changes: 0 additions & 40 deletions build/CoiniumServ.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoiniumServ", "..\src\Coini
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "..\src\Tests\Tests.csproj", "{73CE2C0A-12E6-42FD-8021-C75827D014E3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gibbed.IO", "..\deps\gibbed.io\Gibbed.IO.csproj", "{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonConfig", "..\deps\jsonconfig\JsonConfig\JsonConfig.csproj", "{10095092-E1E5-441F-9380-B6329F3CFEB4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoiniumServGui", "..\src\CoiniumServGui\CoiniumServGui.csproj", "{1E2AF218-156A-40A0-8DA3-95DD13D93810}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSRedis", "..\deps\csredis\CSRedis\CSRedis.csproj", "{D35E185E-A7E1-41E1-846C-21944F56074F}"
Expand Down Expand Up @@ -71,42 +67,6 @@ Global
{73CE2C0A-12E6-42FD-8021-C75827D014E3}.Testing|Mixed Platforms.Build.0 = Release|Any CPU
{73CE2C0A-12E6-42FD-8021-C75827D014E3}.Testing|x86.ActiveCfg = Release|Any CPU
{73CE2C0A-12E6-42FD-8021-C75827D014E3}.Testing|x86.Build.0 = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|x86.ActiveCfg = Debug|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|x86.Build.0 = Debug|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|Any CPU.Build.0 = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|x86.ActiveCfg = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|x86.Build.0 = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|Any CPU.ActiveCfg = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|Any CPU.Build.0 = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|Mixed Platforms.ActiveCfg = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|Mixed Platforms.Build.0 = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|x86.ActiveCfg = Release|Any CPU
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|x86.Build.0 = Release|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|x86.ActiveCfg = Debug|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|x86.Build.0 = Debug|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|Any CPU.Build.0 = Release|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|x86.ActiveCfg = Release|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|x86.Build.0 = Release|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|Any CPU.ActiveCfg = Testing|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|Any CPU.Build.0 = Testing|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|Mixed Platforms.ActiveCfg = Testing|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|Mixed Platforms.Build.0 = Testing|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|x86.ActiveCfg = Testing|Any CPU
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|x86.Build.0 = Testing|Any CPU
{1E2AF218-156A-40A0-8DA3-95DD13D93810}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E2AF218-156A-40A0-8DA3-95DD13D93810}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E2AF218-156A-40A0-8DA3-95DD13D93810}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion deps/csredis
Submodule csredis updated 55 files
+31 −17 CHANGELOG.md
+20 −11 CSRedis.Tests/CSRedis.Tests.csproj
+13 −11 CSRedis.Tests/ConnectionTests.cs
+36 −34 CSRedis.Tests/HashTests.cs
+8 −6 CSRedis.Tests/HyperLogLogTests.cs
+48 −46 CSRedis.Tests/KeyTests.cs
+40 −38 CSRedis.Tests/ListTests.cs
+18 −16 CSRedis.Tests/PubSubTests.cs
+26 −0 CSRedis.Tests/RegressionTests.cs
+16 −12 CSRedis.Tests/ScriptingTests.cs
+5 −3 CSRedis.Tests/SentinelTests.cs
+58 −56 CSRedis.Tests/ServerTests.cs
+32 −30 CSRedis.Tests/SetTests.cs
+48 −46 CSRedis.Tests/SortedSetTests.cs
+48 −46 CSRedis.Tests/StringTests.cs
+12 −10 CSRedis.Tests/TransactionTests.cs
+25 −6 CSRedis/CSRedis.csproj
+25 −2 CSRedis/Exceptions.cs
+2,105 −0 CSRedis/IRedisClient.cs
+2,080 −0 CSRedis/IRedisClientAsync.cs
+1 −1 CSRedis/Internal/Commands/RedisArray.cs
+1 −1 CSRedis/Internal/Commands/RedisBytes.cs
+12 −0 CSRedis/Internal/Commands/RedisObject.cs
+0 −118 CSRedis/Internal/DefaultConnector.cs
+81 −0 CSRedis/Internal/Fakes/FakeRedisSocket.cs
+49 −0 CSRedis/Internal/Fakes/FakeStream.cs
+170 −0 CSRedis/Internal/IO/AsyncConnector.cs
+43 −0 CSRedis/Internal/IO/RedisAsyncCommandToken.cs
+46 −0 CSRedis/Internal/IO/RedisIO.cs
+27 −23 CSRedis/Internal/IO/RedisReader.cs
+67 −0 CSRedis/Internal/IO/RedisSocket.cs
+25 −150 CSRedis/Internal/IO/RedisWriter.cs
+70 −0 CSRedis/Internal/IO/SocketAsyncPool.cs
+0 −24 CSRedis/Internal/IRedisConnector.cs
+0 −263 CSRedis/Internal/MockConnector.cs
+3 −3 CSRedis/Internal/MonitorListener.cs
+14 −8 CSRedis/Internal/RedisCommand.cs
+0 −244 CSRedis/Internal/RedisConnection.cs
+231 −0 CSRedis/Internal/RedisConnector.cs
+4 −4 CSRedis/Internal/RedisListener.cs
+14 −8 CSRedis/Internal/RedisPipeline.cs
+18 −18 CSRedis/Internal/RedisTransaction.cs
+1 −1 CSRedis/Internal/SubscriptionListener.cs
+1 −1 CSRedis/Internal/Utilities/RedisArgs.cs
+4 −4 CSRedis/Properties/AssemblyInfo.cs
+183 −183 CSRedis/RedisClient.Async.cs
+210 −202 CSRedis/RedisClient.Sync.cs
+96 −37 CSRedis/RedisClient.cs
+14 −14 CSRedis/RedisSentinelClient.Async.cs
+19 −19 CSRedis/RedisSentinelClient.Sync.cs
+28 −30 CSRedis/RedisSentinelClient.cs
+59 −23 CSRedis/RedisSentinelManager.cs
+0 −0 LICENSE
+40 −23 README.md
+ csredis.pub.snk
1 change: 0 additions & 1 deletion deps/gibbed.io
Submodule gibbed.io deleted from 2a0de1
1 change: 0 additions & 1 deletion deps/jsonconfig
Submodule jsonconfig deleted from 4bfac3
24 changes: 8 additions & 16 deletions src/CoiniumServ/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<appSettings>
<add key="webPages:Enabled" value="false" />
</appSettings>
Expand All @@ -34,4 +18,12 @@
</namespaces>
</pages>
</system.web.webPages.razor>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
1 change: 0 additions & 1 deletion src/CoiniumServ/Banning/BanConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System;
using Serilog;

Expand Down
3 changes: 1 addition & 2 deletions src/CoiniumServ/Banning/BanManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading;
using CoiniumServ.Miners;
using CoiniumServ.Pools.Config;
using CoiniumServ.Pools;
using CoiniumServ.Server.Mining.Stratum.Sockets;
using CoiniumServ.Server.Mining.Vanilla;
using CoiniumServ.Shares;
Expand Down
1 change: 0 additions & 1 deletion src/CoiniumServ/Banning/IBanConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using CoiniumServ.Configuration;

namespace CoiniumServ.Banning
Expand Down
1 change: 0 additions & 1 deletion src/CoiniumServ/Banning/IBanManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System.Net;

namespace CoiniumServ.Banning
Expand Down
3 changes: 1 addition & 2 deletions src/CoiniumServ/Blocks/BlockProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System.Linq;
using CoiniumServ.Daemon;
using CoiniumServ.Daemon.Exceptions;
using CoiniumServ.Daemon.Responses;
using CoiniumServ.Pools.Config;
using CoiniumServ.Pools;
using Serilog;

namespace CoiniumServ.Blocks
Expand Down
1 change: 0 additions & 1 deletion src/CoiniumServ/Blocks/IBlockProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using CoiniumServ.Daemon.Responses;

namespace CoiniumServ.Blocks
Expand Down
1 change: 0 additions & 1 deletion src/CoiniumServ/Coin/Address/Base58.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System;
using System.Linq;
using System.Text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System;

namespace CoiniumServ.Coin.Address.Exceptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System;

namespace CoiniumServ.Coin.Address.Exceptions
Expand Down
7 changes: 4 additions & 3 deletions src/CoiniumServ/Coin/Coinbase/Serializers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System;
using System.IO;
using System.Text;
Expand All @@ -42,8 +41,9 @@ public static class Serializers
/// <param name="job"></param>
/// <param name="header"></param>
/// <param name="coinbase"></param>
/// <param name="IsPOSCoin">Are we serializing a proof-of-stake coin block</param>
/// <returns></returns>
public static byte[] SerializeBlock(IJob job, byte[] header, byte[] coinbase)
public static byte[] SerializeBlock(IJob job, byte[] header, byte[] coinbase, bool IsPOSCoin = false)
{
byte[] result;

Expand All @@ -58,7 +58,8 @@ public static byte[] SerializeBlock(IJob job, byte[] header, byte[] coinbase)
stream.WriteBytes(transaction.Data.HexToByteArray());
}

// need to implement POS support too.
if (IsPOSCoin) // check if we are serializing a block for proof-of-stake coin.
stream.WriteByte(0); // proof-of-stake coins require a zero byte appended to block which the daemon replaces with signature.

result = stream.ToArray();
}
Expand Down
1 change: 0 additions & 1 deletion src/CoiniumServ/Coin/Coinbase/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System;
using System.IO;
using System.Linq;
Expand Down
10 changes: 9 additions & 1 deletion src/CoiniumServ/Coin/Config/CoinConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// license or white-label it as set out in licenses/commercial.txt.
//
#endregion

using System;
using Serilog;

Expand All @@ -33,17 +32,26 @@ public class CoinConfig : ICoinConfig
public string Symbol { get; private set; }
public string Algorithm { get; private set; }
public bool SupportsTxMessages { get; private set; }
public bool IsPOS { get; set; }
public string BlockExplorer { get; private set; }
public dynamic Options { get; private set; }

public CoinConfig(dynamic config)
{
try
{
// set the coin data.
Name = config.name;
Symbol = config.symbol;
Algorithm = config.algorithm;
SupportsTxMessages = config.txMessages;

// check the coin type.
if (string.IsNullOrEmpty(config.reward)) // if no value is set, behave it as a proof-of-work coin by default.
IsPOS = false;
else // if we have a reward value set.
IsPOS = config.reward.ToString().ToLower() == "pos"; // see if it's a proof-of-stake coin or proof-of-work coin.

BlockExplorer = string.IsNullOrEmpty(config.blockExplorer) ? "https://altexplorer.net" : config.blockExplorer;
Options = config;

Expand Down
Loading

0 comments on commit 01e8582

Please sign in to comment.