iceland2k14 / solominer

Solo Mining in python for BTC Block Reward, Pure luck
MIT License
80 stars 31 forks source link

If hash is found it wont submit #12

Closed abaddon30 closed 2 years ago

abaddon30 commented 2 years ago

sock is not defined here :)

if hash < target :

init a connection to ckpool

        logg('[*] Block {} solved.'.format(work_on+1))
        logg('[*] Block hash: {}'.format(hash))
        logg('[*] Blockheader: {}'.format(blockheader))            
        payload = bytes('{"params": ["'+address+'", "'+ctx.job_id+'", "'+ctx.extranonce2 \
            +'", "'+ctx.ntime+'", "'+nonce+'"], "id": 1, "method": "mining.submit"}\n', 'utf-8')
        logg('[*] Payload: {}'.format(payload))
        sock.sendall(payload)
        ret = sock.recv(1024)
thearthouse commented 2 years ago

ctx.extranonce2 also not defined

iceland2k14 commented 2 years ago

Updated in #13