|
|
@ -2323,6 +2323,7 @@ unparam: |
|
|
|
|
|
|
|
|
|
|
|
bool payments_fill(PGconn *conn) |
|
|
|
bool payments_fill(PGconn *conn) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
char tickbuf[256], pcombuf[64]; |
|
|
|
ExecStatusType rescode; |
|
|
|
ExecStatusType rescode; |
|
|
|
PGresult *res; |
|
|
|
PGresult *res; |
|
|
|
K_ITEM *item = NULL; |
|
|
|
K_ITEM *item = NULL; |
|
|
@ -2335,6 +2336,9 @@ bool payments_fill(PGconn *conn) |
|
|
|
|
|
|
|
|
|
|
|
LOGDEBUG("%s(): select", __func__); |
|
|
|
LOGDEBUG("%s(): select", __func__); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
STRNCPY(tickbuf, TICK_PREFIX"pm 0"); |
|
|
|
|
|
|
|
cr_msg(false, tickbuf); |
|
|
|
|
|
|
|
|
|
|
|
sel = "declare ps cursor for select " |
|
|
|
sel = "declare ps cursor for select " |
|
|
|
"paymentid,payoutid,userid,subname,paydate,payaddress," |
|
|
|
"paymentid,payoutid,userid,subname,paydate,payaddress," |
|
|
|
"originaltxn,amount,diffacc,committxn,commitblockhash" |
|
|
|
"originaltxn,amount,diffacc,committxn,commitblockhash" |
|
|
@ -2449,6 +2453,13 @@ bool payments_fill(PGconn *conn) |
|
|
|
|
|
|
|
|
|
|
|
add_to_ktree(payments_root, item); |
|
|
|
add_to_ktree(payments_root, item); |
|
|
|
k_add_head(payments_store, item); |
|
|
|
k_add_head(payments_store, item); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (n == 0 || ((n+1) % 100000) == 0) { |
|
|
|
|
|
|
|
pcom(n+1, pcombuf, sizeof(pcombuf)); |
|
|
|
|
|
|
|
snprintf(tickbuf, sizeof(tickbuf), |
|
|
|
|
|
|
|
TICK_PREFIX"pm %s", pcombuf); |
|
|
|
|
|
|
|
cr_msg(false, tickbuf); |
|
|
|
|
|
|
|
} |
|
|
|
tick(); |
|
|
|
tick(); |
|
|
|
n++; |
|
|
|
n++; |
|
|
|
} |
|
|
|
} |
|
|
@ -6635,6 +6646,7 @@ unparam: |
|
|
|
|
|
|
|
|
|
|
|
bool miningpayouts_fill(PGconn *conn) |
|
|
|
bool miningpayouts_fill(PGconn *conn) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
char tickbuf[256], pcombuf[64]; |
|
|
|
ExecStatusType rescode; |
|
|
|
ExecStatusType rescode; |
|
|
|
PGresult *res; |
|
|
|
PGresult *res; |
|
|
|
K_ITEM *item = NULL; |
|
|
|
K_ITEM *item = NULL; |
|
|
@ -6647,6 +6659,9 @@ bool miningpayouts_fill(PGconn *conn) |
|
|
|
|
|
|
|
|
|
|
|
LOGDEBUG("%s(): select", __func__); |
|
|
|
LOGDEBUG("%s(): select", __func__); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
STRNCPY(tickbuf, TICK_PREFIX"mp 0"); |
|
|
|
|
|
|
|
cr_msg(false, tickbuf); |
|
|
|
|
|
|
|
|
|
|
|
sel = "declare mp cursor for select " |
|
|
|
sel = "declare mp cursor for select " |
|
|
|
"payoutid,userid,diffacc,amount" |
|
|
|
"payoutid,userid,diffacc,amount" |
|
|
|
HISTORYDATECONTROL |
|
|
|
HISTORYDATECONTROL |
|
|
@ -6735,6 +6750,13 @@ bool miningpayouts_fill(PGconn *conn) |
|
|
|
|
|
|
|
|
|
|
|
add_to_ktree(miningpayouts_root, item); |
|
|
|
add_to_ktree(miningpayouts_root, item); |
|
|
|
k_add_head(miningpayouts_store, item); |
|
|
|
k_add_head(miningpayouts_store, item); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (n == 0 || ((n+1) % 100000) == 0) { |
|
|
|
|
|
|
|
pcom(n+1, pcombuf, sizeof(pcombuf)); |
|
|
|
|
|
|
|
snprintf(tickbuf, sizeof(tickbuf), |
|
|
|
|
|
|
|
TICK_PREFIX"mp %s", pcombuf); |
|
|
|
|
|
|
|
cr_msg(false, tickbuf); |
|
|
|
|
|
|
|
} |
|
|
|
tick(); |
|
|
|
tick(); |
|
|
|
n++; |
|
|
|
n++; |
|
|
|
} |
|
|
|
} |
|
|
|