Skip to content

Commit

Permalink
Fix a crash happening before budget activation and bump Dash proto ve…
Browse files Browse the repository at this point in the history
…rsion (#61)

* Check for 'payee' being in the 'masternode' object first before using it

For some reason, old 12.3.x versions have an empty 'masternode' object
in the block template before the budget activates. This is only happening
when resetting testnet, but might also be a problem in the future when
used on devnets.

* Bump proto version to 70213

As used on the new testnet and later on mainnet.
  • Loading branch information
codablock authored and UdjinM6 committed Dec 27, 2018
1 parent b241ded commit 222f57a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions p2pool/dash/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ def go():

for obj in payment_objects:
g={}
g['payee'] = str(obj['payee'])
g['amount'] = obj['amount']
if g['amount'] > 0:
payment_amount += g['amount']
packed_payments.append(g)
if 'payee' in obj:
g['payee'] = str(obj['payee'])
g['amount'] = obj['amount']
if g['amount'] > 0:
payment_amount += g['amount']
packed_payments.append(g)

coinbase_payload = None
if 'coinbase_payload' in work and len(work['coinbase_payload']) != 0:
Expand Down
2 changes: 1 addition & 1 deletion p2pool/dash/p2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, net):

def connectionMade(self):
self.send_version(
version=70212,
version=70213,
services=1,
time=int(time.time()),
addr_to=dict(
Expand Down

0 comments on commit 222f57a

Please sign in to comment.