From f802a7843bbed2b085d5d3fa4306e3205e483a17 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 25 Aug 2014 21:50:45 +1000 Subject: [PATCH] Fix proxy breakage with attempting to validate btcaddress that isn't used --- src/stratifier.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index fe21ccef..f4806eeb 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2594,18 +2594,20 @@ int stratifier(proc_instance_t *pi) buf = send_recv_proc(ckp->generator, "ping"); } while (!buf); - if (!test_address(ckp, ckp->btcaddress)) { - LOGEMERG("Fatal: btcaddress invalid according to bitcoind"); - goto out; - } + if (!ckp->proxy) { + if (!test_address(ckp, ckp->btcaddress)) { + LOGEMERG("Fatal: btcaddress invalid according to bitcoind"); + goto out; + } - /* Store this for use elsewhere */ - hex2bin(scriptsig_header_bin, scriptsig_header, 41); - address_to_pubkeytxn(pubkeytxnbin, ckp->btcaddress); + /* Store this for use elsewhere */ + hex2bin(scriptsig_header_bin, scriptsig_header, 41); + address_to_pubkeytxn(pubkeytxnbin, ckp->btcaddress); - if (test_address(ckp, ckp->donaddress)) { - ckp->donvalid = true; - address_to_pubkeytxn(donkeytxnbin, ckp->donaddress); + if (test_address(ckp, ckp->donaddress)) { + ckp->donvalid = true; + address_to_pubkeytxn(donkeytxnbin, ckp->donaddress); + } } /* Set the initial id to time as high bits so as to not send the same