Skip to content

Commit

Permalink
extern workername's length to 30
Browse files Browse the repository at this point in the history
  • Loading branch information
Mita23456 authored and SwimmingTiger committed Mar 22, 2020
1 parent 7e53b7f commit f4af14b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion install/bpool_local_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CREATE TABLE `mining_workers` (
`worker_id` bigint(20) NOT NULL,
`puid` int(11) NOT NULL,
`group_id` int(11) NOT NULL,
`worker_name` varchar(20) DEFAULT NULL,
`worker_name` varchar(30) DEFAULT NULL,
`accept_1m` bigint(20) NOT NULL DEFAULT '0',
`accept_5m` bigint(20) NOT NULL DEFAULT '0',
`accept_15m` bigint(20) NOT NULL DEFAULT '0',
Expand Down
5 changes: 3 additions & 2 deletions src/Stratum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ void StratumWorker::setNames(
userNormalizer(userName_);

// max length for worker name is 20
if (!extralength && workerName_.length() > 20) {
workerName_.resize(20);
// extern length of worker name to 30
if (!extralength && workerName_.length() > 30) {
workerName_.resize(30);
}

if (workerName_.empty()) {
Expand Down

0 comments on commit f4af14b

Please sign in to comment.