From aec1fb4d498a71314105fd5d134e3e24adfc701f Mon Sep 17 00:00:00 2001 From: yuriy0803 <68668177+yuriy0803@users.noreply.github.com> Date: Thu, 11 Mar 2021 12:33:49 +0100 Subject: [PATCH] Update --- README.md | 2 +- api.json | 2 +- storage/redis.go | 13 +++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e8f461e..dd7bc5d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Open Source Ethereum Classic Mining Pool PPLNS +## Open Source Ethereum Classic Mining Pool SOLO Donations ETC: 0xd92fa5a9732a0aec36dc8d5a6a1305dc2d3e09e6 diff --git a/api.json b/api.json index 284b10e..ec76655 100644 --- a/api.json +++ b/api.json @@ -2,7 +2,7 @@ "threads": 2, "coin": "etc", "name": "main", - "pplns": 9000, + "pplns": 0, "network": "classic", "proxy": { diff --git a/storage/redis.go b/storage/redis.go index 86c87db..98f67f1 100644 --- a/storage/redis.go +++ b/storage/redis.go @@ -440,10 +440,15 @@ func (r *RedisClient) WriteBlock(login, id string, params []string, diff, roundD } func (r *RedisClient) writeShare(tx *redis.Multi, ms, ts int64, login, id string, diff int64, expire time.Duration) { - times := int(diff / 1000000000) - for i := 0; i < times; i++ { - tx.LPush(r.formatKey("lastshares"), login) - } + /* # Note To Me: + Will have to write to get from redis the current value for round + shares and increase by 1, then include the new number to be added to redis + */ + +// Moved get hostname to stratums + + + tx.LPush(r.formatKey("lastshares"), login) tx.LTrim(r.formatKey("lastshares"), 0, r.pplns) tx.HIncrBy(r.formatKey("shares", "roundCurrent"), login, diff) tx.ZAdd(r.formatKey("hashrate"), redis.Z{Score: float64(ts), Member: join(diff, login, id, ms)})