Browse Source

Add a braindead check to avoid trying to generate to a script address

master
Con Kolivas 10 years ago
parent
commit
b66f207a9f
  1. 11
      src/stratifier.c

11
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);

Loading…
Cancel
Save