From b66f207a9fac0373570a218cad70b73b0212c90e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 15 Jun 2015 14:44:16 +1000 Subject: [PATCH] Add a braindead check to avoid trying to generate to a script address --- src/stratifier.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index c18ed5d0..3a2e0246 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -4456,6 +4456,13 @@ static void read_poolstats(ckpool_t *ckp) } } +/* Braindead check to see if this btcaddress is an M of N script address which + * is currently unsupported as a generation address. */ +static bool script_address(const char *btcaddress) +{ + return btcaddress[0] == '3'; +} + int stratifier(proc_instance_t *pi) { pthread_t pth_blockupdate, pth_statsupdate, pth_heartbeat; @@ -4483,6 +4490,10 @@ int stratifier(proc_instance_t *pi) LOGEMERG("Fatal: btcaddress invalid according to bitcoind"); goto out; } + if (script_address(ckp->btcaddress)) { + LOGEMERG("Fatal: btcaddress valid but unsupported M of N 3x address"); + goto out; + } /* Store this for use elsewhere */ hex2bin(scriptsig_header_bin, scriptsig_header, 41);