From 51ce45c40fa4f6316dba896666f8035b576c7cc8 Mon Sep 17 00:00:00 2001 From: kanoi Date: Sun, 31 Aug 2014 18:32:50 +1000 Subject: [PATCH] ckdb - correct block messages --- src/ckdb.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ckdb.c b/src/ckdb.c index 3e2eb20e..6393e6b3 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -5009,13 +5009,12 @@ static bool blocks_add(PGconn *conn, char *height, char *blockhash, k_add_head(blocks_free, b_item); K_WUNLOCK(blocks_free); // No mismatch messages during startup - if (!startup_complete) { + if (startup_complete) { tv_to_buf(cd, cd_buf, sizeof(cd_buf)); - LOGERR("%s(): Request Status: %s requires Status: %s. " + LOGERR("%s(): New Status: %s requires Status: %c. " "Ignored: Status: %s, Block: %s/...%s/%s", __func__, - blocks_confirmed(confirmed), - blocks_confirmed(BLOCKS_CONFIRM_STR), + blocks_confirmed(confirmed), want, blocks_confirmed(DATA_BLOCKS(old_b_item)->confirmed), height, blk_dsp, cd_buf); } @@ -8218,7 +8217,10 @@ static char *cmd_blocks_do(PGconn *conn, char *cmd, char *id, char *by, } if (!ok) { - LOGERR("%s() %s.failed.DBE", __func__, id); + /* Ignore during startup, + * another error should have shown if it matters */ + if (startup_complete) + LOGERR("%s() %s.failed.DBE", __func__, id); return strdup("failed.DBE"); }