Added Block Hash Output
This commit is contained in:
parent
02755dbb6a
commit
4f5388f715
@ -43,11 +43,12 @@ class BitcoinRPC(object):
|
|||||||
def submitblock(self, block_hex, block_hash_hex):
|
def submitblock(self, block_hex, block_hash_hex):
|
||||||
# Try submitblock if that fails, go to getblocktemplate
|
# Try submitblock if that fails, go to getblocktemplate
|
||||||
try:
|
try:
|
||||||
print("Submitting Block with Submit Block ")
|
log.info("Submitting Block with Submit Block ")
|
||||||
|
log.info("Block Hash: %s" [block_hex,])
|
||||||
resp = (yield self._call('submitblock', [block_hex,]))
|
resp = (yield self._call('submitblock', [block_hex,]))
|
||||||
except Exception:
|
except Exception:
|
||||||
try:
|
try:
|
||||||
print("Submit Block call failed, trying GetBlockTemplate")
|
log.exception "Submit Block call failed, trying GetBlockTemplate")
|
||||||
resp = (yield self._call('getblocktemplate', [{'mode': 'submit', 'data': block_hex}]))
|
resp = (yield self._call('getblocktemplate', [{'mode': 'submit', 'data': block_hex}]))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.exception("Both SubmitBlock and GetBlockTemplate failed. Problem Submitting block %s" % str(e))
|
log.exception("Both SubmitBlock and GetBlockTemplate failed. Problem Submitting block %s" % str(e))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user