From 12b816c54e6bc68d9cd1e64b425219ceb5c3316b Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 8 Aug 2014 15:36:04 +1000 Subject: [PATCH] ckdb - correct block confirm sql --- src/ckdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ckdb.c b/src/ckdb.c index 2c5add0d..a82db3b6 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -4154,11 +4154,11 @@ static bool blocks_add(PGconn *conn, char *height, char *blockhash, ins = "insert into blocks " "(height,blockhash,workinfoid,userid,workername," "clientid,enonce1,nonce2,nonce,reward,confirmed" - HISTORYDATECONTROL ") values (select " + HISTORYDATECONTROL ") select " "height,blockhash,workinfoid,userid,workername," "clientid,enonce1,nonce2,nonce,reward,confirmed," "$3,$4,$5,$6,$7 from blocks where" - "blockhash=$1 and expirydate=$2)"; + "blockhash=$1 and expirydate=$2"; res = PQexecParams(conn, ins, par, NULL, (const char **)params, NULL, NULL, 0); rescode = PQresultStatus(res);