Browse Source

Remove donation address

master
Sergey Markov 3 years ago
parent
commit
9823d1d708
  1. 6
      README.md
  2. 3
      src/ckpool.c
  3. 4
      src/ckpool.h
  4. 25
      src/stratifier.c

6
README.md

@ -3,11 +3,7 @@ CKPOOL + CKPROXY + libckpool by Con Kolivas
Ultra low overhead massively scalable multi-process, multi-threaded modular
bitcoin mining pool, proxy, passthrough, and library in c for Linux.
CKPOOL is code provided free of charge under the GPLv3 license but its development
is mostly paid for by commissioned funding, and the pool by default contributes
0.5% of solved blocks in pool mode to the development team. Please consider leaving
this contribution in the code if you are running it on a pool or contributing to the
authors listed in AUTHORS if you use this code to aid funding further development.
CKPOOL is code provided free of charge under the GPLv3 license
---
LICENSE:

3
src/ckpool.c

@ -1824,9 +1824,8 @@ int main(int argc, char **argv)
ckp.btcdpass[i] = strdup("pass");
}
ckp.donaddress = "14BMjogz69qe8hk9thyzbmR5pg34mVKB1e";
if (!ckp.btcaddress)
ckp.btcaddress = ckp.donaddress;
quit(0, "BTCR address is not set (config key btcaddress)");
if (!ckp.blockpoll)
ckp.blockpoll = 100;
if (!ckp.nonce1length)

4
src/ckpool.h

@ -247,10 +247,6 @@ struct ckpool_instance {
bool script; // Address is a script address
bool segwit; // Address is a segwit address
char *btcsig; // Optional signature to add to coinbase
char *donaddress; // Donation address
bool donscript; // Donation is a script
bool donsegwit; // Donation is segwit
bool donvalid; // Donation address works on this network
/* Stratum options */
server_instance_t **servers;

25
src/stratifier.c

@ -409,8 +409,6 @@ struct stratifier_data {
char txnbin[48];
int txnlen;
char dontxnbin[48];
int dontxnlen;
pool_stats_t stats;
/* Protects changes to pool stats */
@ -622,12 +620,7 @@ static void generate_coinbase(const ckpool_t *ckp, workbase_t *wb)
// Generation value
g64 = wb->coinbasevalue;
if (ckp->donvalid) {
d64 = g64 / 200; // 0.5% donation
g64 -= d64; // To guarantee integers add up to the original coinbasevalue
wb->coinb2bin[wb->coinb2len++] = 2 + wb->insert_witness;
} else
wb->coinb2bin[wb->coinb2len++] = 1 + wb->insert_witness;
wb->coinb2bin[wb->coinb2len++] = 1 + wb->insert_witness;
u64 = (uint64_t *)&wb->coinb2bin[wb->coinb2len];
*u64 = htole64(g64);
@ -649,16 +642,6 @@ static void generate_coinbase(const ckpool_t *ckp, workbase_t *wb)
wb->coinb2len += witnessdata_size;
}
if (ckp->donvalid) {
u64 = (uint64_t *)&wb->coinb2bin[wb->coinb2len];
*u64 = htole64(d64);
wb->coinb2len += 8;
wb->coinb2bin[wb->coinb2len++] = sdata->dontxnlen;
memcpy(wb->coinb2bin + wb->coinb2len, sdata->dontxnbin, sdata->dontxnlen);
wb->coinb2len += sdata->dontxnlen;
}
wb->coinb2len += 4; // Blank lock
wb->coinb2 = bin2hex(wb->coinb2bin, wb->coinb2len);
@ -2376,7 +2359,6 @@ static sdata_t *duplicate_sdata(const sdata_t *sdata)
/* Copy the transaction binaries for workbase creation */
memcpy(dsdata->txnbin, sdata->txnbin, 48);
memcpy(dsdata->dontxnbin, sdata->dontxnbin, 48);
/* Use the same work queues for all subproxies */
dsdata->ssends = sdata->ssends;
@ -8750,11 +8732,6 @@ void *stratifier(void *arg)
/* Store this for use elsewhere */
hex2bin(scriptsig_header_bin, scriptsig_header, 41);
sdata->txnlen = address_to_txn(sdata->txnbin, ckp->btcaddress, ckp->script, ckp->segwit);
if (generator_checkaddr(ckp, ckp->donaddress, &ckp->donscript, &ckp->donsegwit)) {
ckp->donvalid = true;
sdata->dontxnlen = address_to_txn(sdata->dontxnbin, ckp->donaddress, ckp->donscript, ckp->donsegwit);
}
}
randomiser = time(NULL);

Loading…
Cancel
Save