diff --git a/src/ckdb.h b/src/ckdb.h index 97e5e33f..6f2419d0 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -58,7 +58,7 @@ #define DB_VLOCK "1" #define DB_VERSION "1.0.7" -#define CKDB_VERSION DB_VERSION"-2.503" +#define CKDB_VERSION DB_VERSION"-2.504" #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 e95ebb3c..bc4c1549 100644 --- a/src/ckdb_data.c +++ b/src/ckdb_data.c @@ -1206,7 +1206,8 @@ K_ITEM *_find_create_workerstatus(bool gotlock, bool alertcreate, bzero(row, sizeof(*row)); row->userid = userid; - row->in_workername = workername; + row->in_workername = intransient_str("workername", + workername); add_to_ktree(workerstatus_root, ws_item); k_add_head(workerstatus_store, ws_item); diff --git a/src/ckdb_dbio.c b/src/ckdb_dbio.c index 079c1a98..8dc28bf7 100644 --- a/src/ckdb_dbio.c +++ b/src/ckdb_dbio.c @@ -1480,7 +1480,6 @@ bool useratts_fill(PGconn *conn) return ok; } -// WARNING: workername must be intransient K_ITEM *workers_add(PGconn *conn, int64_t userid, char *workername, bool add_ws, char *difficultydefault, char *idlenotificationenabled, char *idlenotificationtime, char *by, char *code, @@ -1530,7 +1529,7 @@ K_ITEM *workers_add(PGconn *conn, int64_t userid, char *workername, bool add_ws, goto unitem; row->userid = userid; - row->in_workername = workername; + row->in_workername = intransient_str("workername", workername); if (difficultydefault && *difficultydefault) { diffdef = atoi(difficultydefault); // If out of the range, set it in the range @@ -5651,6 +5650,7 @@ bool _sharesummary_update(SHARES *s_row, SHAREERRORS *e_row, tv_t *cd, DATA_SHARESUMMARY(row, ss_item); bzero(row, sizeof(*row)); row->userid = userid; + // workername is intransient row->in_workername = workername; row->workinfoid = workinfoid; } @@ -6051,6 +6051,7 @@ bool blocks_add(PGconn *conn, int32_t height, char *blockhash, STRNCPY(row->confirmed, confirmed); STRNCPY(row->info, info); TXT_TO_BIGINT("workinfoid", workinfoid, row->workinfoid); + // workername is intransient or EMPTY row->in_workername = workername; TXT_TO_INT("clientid", clientid, row->clientid); STRNCPY(row->enonce1, enonce1);