Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for litecoin block sending

Use getblocktemplate instead of submitblock for litecoin node
  • Loading branch information...
commit d2e2257e959812186f0c78384decb37d8181c4d4 1 parent 77e7e2a
@Rav3nPL Rav3nPL authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 p2pool/bitcoin/helper.py
View
8 p2pool/bitcoin/helper.py
@@ -70,8 +70,12 @@ def submit_block_p2p(block, factory, net):
@defer.inlineCallbacks
def submit_block_rpc(block, ignore_failure, bitcoind, bitcoind_work, net):
if bitcoind_work.value['use_getblocktemplate']:
- result = yield bitcoind.rpc_submitblock(bitcoin_data.block_type.pack(block).encode('hex'))
- success = result is None
+ if 'lite' in self.node.net.NAME:
+ result = yield bitcoind.rpc_getblocktemplate(dict(mode='submit', data=bitcoin_data.block_type.pack(block).encode('hex')))
+ success = result is None
+ else:
+ result = yield bitcoind.rpc_submitblock(bitcoin_data.block_type.pack(block).encode('hex'))
+ success = result is None
else:
result = yield bitcoind.rpc_getmemorypool(bitcoin_data.block_type.pack(block).encode('hex'))
success = result
Please sign in to comment.
Something went wrong with that request. Please try again.