Skip to content
Open
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
7 changes: 6 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ PoolServer
Cryptocurrency mining pool written in C++ for speed. Supports Stratum.

Dependencies:
Boost Libraries (http://www.boost.org/)
Boost Libraries (http://www.boost.org/) (1.62! ubuntu zetty is fine)
MySQL Library (http://www.mysql.com/)
CMake (http://www.cmake.org/)
# libboost-all-dev libmysqld-dev libssl-dev libgmp-dev

Building on linux:
# cd /path/to/source
Expand Down Expand Up @@ -40,3 +41,7 @@ Usage:
--MySQLDatabase arg (=poolserver) MySQL Database
--MySQLSyncThreads arg (=2) MySQL Sync Threads to Create
--MySQLAsyncThreads arg (=2) MySQL Async Threads to Create

===
P.S
Этот пул никогда не работал. Слова orignal'а. Настоящий пул не этот.
2 changes: 1 addition & 1 deletion db/create.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DROP TABLE IF EXISTS `pool_worker`;
CREATE TABLE IF NOT EXISTS `pool_worker`
(
`id` INT(255) NOT NULL AUTO_INCREMENT,
`account_id` INT(255) NOT NULL AUTO_INCREMENT,
`username` VARCHAR(50) DEFAULT NULL,
`password` VARCHAR(50) DEFAULT NULL,
`mindiff` int(10) unsigned NOT NULL DEFAULT '1',
Expand Down
2 changes: 1 addition & 1 deletion src/server/poolserver/Stratum/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ namespace Stratum
std::string username = msg["params"][0].GetString();
std::string password = msg["params"][1].GetString();

MySQL::QueryResult result = sDatabase.Query(Util::FS("SELECT `id`, `mindiff` FROM `pool_worker` WHERE `username` = '%s' and `password` = '%s'", sDatabase.Escape(username).c_str(), sDatabase.Escape(password).c_str()).c_str());
MySQL::QueryResult result = sDatabase.Query(Util::FS("SELECT `account_id`, `mindiff` FROM `pool_worker` WHERE `username` = '%s' and `password` = '%s'", sDatabase.Escape(username).c_str(), sDatabase.Escape(password).c_str()).c_str());

if (result) {
_workers.insert(username);
Expand Down
1 change: 1 addition & 0 deletions src/server/shared/Gostcoin/Gostcoin.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Gostcoin
inline BigInt TargetToDiff(BigInt val)
{
static BigInt c("0x00000000ffff0000000000000000000000000000000000000000000000000000");
if (val == 0) return c;
return (c / val);
}

Expand Down