Browse Source

ckdb - ensure unused payments fields aren't null

master
kanoi 8 years ago
parent
commit
9fd830bbae
  1. 2
      src/ckdb.h
  2. 6
      src/ckdb_data.c

2
src/ckdb.h

@ -58,7 +58,7 @@
#define DB_VLOCK "1" #define DB_VLOCK "1"
#define DB_VERSION "1.0.7" #define DB_VERSION "1.0.7"
#define CKDB_VERSION DB_VERSION"-2.514" #define CKDB_VERSION DB_VERSION"-2.515"
#define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__ #define WHERE_FFL_HERE __FILE__, __func__, __LINE__

6
src/ckdb_data.c

@ -5012,6 +5012,9 @@ bool process_pplns(int32_t height, char *blockhash, tv_t *addr_cd)
(double)(pa->payratio) / (double)(pa->payratio) /
(double)paytotal; (double)paytotal;
used += d64; used += d64;
payments->in_originaltxn =
payments->in_committxn =
payments->in_commitblockhash = EMPTY;
k_add_tail_nolock(pay_store, pay_item); k_add_tail_nolock(pay_store, pay_item);
ok = payments_add(conn, true, pay_item, ok = payments_add(conn, true, pay_item,
&(payments->old_item), &(payments->old_item),
@ -5041,6 +5044,9 @@ bool process_pplns(int32_t height, char *blockhash, tv_t *addr_cd)
payments->amount = amount; payments->amount = amount;
payments->diffacc = miningpayouts->diffacc; payments->diffacc = miningpayouts->diffacc;
used = amount; used = amount;
payments->in_originaltxn =
payments->in_committxn =
payments->in_commitblockhash = EMPTY;
k_add_tail_nolock(pay_store, pay_item); k_add_tail_nolock(pay_store, pay_item);
ok = payments_add(conn, true, pay_item, ok = payments_add(conn, true, pay_item,
&(payments->old_item), &(payments->old_item),

Loading…
Cancel
Save