From 7661f4206b79591a08cd2932e1dcca06f170b3ea Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 23 Aug 2014 18:42:20 +1000 Subject: [PATCH] Don't try to submit a block locally in proxy mode if we're missing transactions --- src/generator.c | 2 +- src/stratifier.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index d1cb739b..d45bdcd8 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1519,7 +1519,7 @@ static int proxy_mode(ckpool_t *ckp, proc_instance_t *pi) if (alive_btcd(si)) LOGNOTICE("Backup btcd %s:%s alive", si->cs.url, si->cs.port); else { - LOGWARNING("Backup btcd %s:%s failed!", si->cs.url, si->cs.port); + LOGNOTICE("Backup btcd %s:%s failed!", si->cs.url, si->cs.port); ckp->btcdbackup = NULL; free(si); } diff --git a/src/stratifier.c b/src/stratifier.c index f91cc580..56c01c87 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1549,6 +1549,9 @@ test_blocksolve(stratum_instance_t *client, workbase_t *wb, const uchar *data, c return; LOGWARNING("Possible block solve diff %f !", diff); + /* Can't submit a block in proxy mode without the transactions */ + if (wb->proxy && wb->merkles) + return; ts_realtime(&ts_now); sprintf(cdfield, "%lu,%lu", ts_now.tv_sec, ts_now.tv_nsec);