Change for stratum mining pools
add conf/config.py to end of file
DONATION=5000000000 #satoshi, 50 coins
change in lib/coinbasetx.py ( inside def __init__(self, timestamper, coinbaser, value, flags, height, data): )
tx_in.scriptSig = tx_in._scriptSig_template[0] + self.extranonce_placeholder + tx_in._scriptSig_template[1]
# LEAFCOIN
charity_value = int(settings.DONATION)
if charity_value > value: # dont set too high. probably you wont :)
charity_value = value
tx_out_charity = halfnode.CTxOut()
tx_out_charity.nValue = charity_value
tx_out_charity.scriptPubKey = util.getCharityScript()
tx_out = halfnode.CTxOut()
tx_out.nValue = value - charity_value
tx_out.scriptPubKey = coinbaser.get_script_pubkey()
if settings.COINDAEMON_TX == 'yes':
self.strTxComment = "http://github.com/ahmedbodi/stratum-mining"
self.vin.append(tx_in)
self.vout.append(tx_out)
self.vout.append(tx_out_charity)
add in lib/util.py to the end
def getCharityScript():
return b'\x76\xa9\x14' + binascii.unhexlify("abe20097fd1476fba24e6e87b2f31da2196cdb88") + b'\x88\xac'; # needs to be this HASH160 address key. other key wont be accepted.
If you dont, mined blocks will not be accepted by the network
Note that these changes (probably) will also apply to a p2pool and multipool.
If you have a p2pool, i can help you out to fix it. Let me know what code is used. PM me