dashpay / sentinel

DashCore Sentinel Engine
https://www.dash.org
MIT License
33 stars 193 forks source link

For 12.2 (branch core-v0.12.2.x) Fails to Parse Numbers with Comma #25

Closed ryansd92 closed 6 years ago

ryansd92 commented 6 years ago

I have two 12.2 TestNet masternodes that are failing to run sentinel (I think). It's definitely failing when i run it manually but it looks as if it's running enough to keep my nodes ENABLED.

I am running the last version of the core-v0.12.2.x branch.

When I run Sentinel manually, I receive the following output on one of my nodes.

ubuntu@ip-10-0-4-117:~$ cd /home/ubuntu/.dashcore/sentinel && venv/bin/python bin/sentinel.py
Traceback (most recent call last):
  File "bin/sentinel.py", line 265, in <module>
    main()
  File "bin/sentinel.py", line 218, in main
    prune_expired_proposals(dashd)
  File "bin/sentinel.py", line 65, in prune_expired_proposals
    for proposal in Proposal.expired(dashd.superblockcycle()):
  File "lib/models.py", line 383, in expired
    for proposal in self.select():
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2193, in next
    obj = self.qrw.iterate()
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2253, in iterate
    return self.process_row(row)
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2331, in process_row
    setattr(instance, column, func(row[i]))
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 1072, in python_value
    return decimal.Decimal(str(value))
  File "/usr/lib/python2.7/decimal.py", line 548, in __new__
    "Invalid literal for Decimal: %r" % value)
  File "/usr/lib/python2.7/decimal.py", line 3872, in _raise_error
    raise error(explanation)
decimal.InvalidOperation: Invalid literal for Decimal: '2,12345678'

When I run it manually on the other node, I receive something similar.

ubuntu@ip-10-0-3-18:~/.dashcore/sentinel$ cd /home/ubuntu/.dashcore/sentinel && venv/bin/python bin/sentinel.py
Traceback (most recent call last):
  File "bin/sentinel.py", line 265, in <module>
    main()
  File "bin/sentinel.py", line 218, in main
    prune_expired_proposals(dashd)
  File "bin/sentinel.py", line 65, in prune_expired_proposals
    for proposal in Proposal.expired(dashd.superblockcycle()):
  File "lib/models.py", line 383, in expired
    for proposal in self.select():
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2193, in next
    obj = self.qrw.iterate()
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2253, in iterate
    return self.process_row(row)
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2331, in process_row
    setattr(instance, column, func(row[i]))
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 1072, in python_value
    return decimal.Decimal(str(value))
  File "/usr/lib/python2.7/decimal.py", line 548, in __new__
    "Invalid literal for Decimal: %r" % value)
  File "/usr/lib/python2.7/decimal.py", line 3872, in _raise_error
    raise error(explanation)
decimal.InvalidOperation: Invalid literal for Decimal: '2,4'
UdjinM6 commented 6 years ago

https://github.com/dashpay/sentinel/pull/24 fixes this

ryansd92 commented 6 years ago

Ok, I checked out that branch and it fixed it. So I should run check-invalid-amounts until it's merged in?

UdjinM6 commented 6 years ago

That's a duplicate of #23 btw and both can be closed now that #24 is merged :)

ryansd92 commented 6 years ago

closing - thank you.