From 59e7d2b7bc0de8d748630a77246fb5c3dc8d089e Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 27 Feb 2015 16:33:29 +1100 Subject: [PATCH] ckdb - pplns2 include the trailing shares in the tv_end check --- src/ckdb.h | 2 +- src/ckdb_data.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ckdb.h b/src/ckdb.h index b11bb0a9..9e84b3da 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -52,7 +52,7 @@ #define DB_VLOCK "1" #define DB_VERSION "1.0.0" -#define CKDB_VERSION DB_VERSION"-1.005" +#define CKDB_VERSION DB_VERSION"-1.006" #define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL_HERE __FILE__, __func__, __LINE__ diff --git a/src/ckdb_data.c b/src/ckdb_data.c index b835798a..f7cc3653 100644 --- a/src/ckdb_data.c +++ b/src/ckdb_data.c @@ -2824,6 +2824,10 @@ bool process_pplns(int32_t height, char *blockhash, tv_t *addr_cd) total_share_count += sharesummary->sharecount; acc_share_count += sharesummary->shareacc; total_diff += sharesummary->diffacc; + // TODO: add lastshareacc to sharesummary and markersummary + if (sharesummary->shareacc > 0 && + tv_newer(&end_tv, &(sharesummary->lastshare))) + copy_tv(&end_tv, &(sharesummary->lastshare)); mu_root = upd_add_mu(mu_root, mu_store, sharesummary->userid, sharesummary->diffacc);