fix invalid claim fees breaking the block processor

This commit is contained in:
Jack Robison 2021-05-06 11:18:58 -04:00
parent fb77fde710
commit 32f7ecb261
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -406,6 +406,7 @@ class SQLDB:
if isinstance(fee.currency, str): if isinstance(fee.currency, str):
claim_record['fee_currency'] = fee.currency.lower() claim_record['fee_currency'] = fee.currency.lower()
if isinstance(fee.amount, Decimal): if isinstance(fee.amount, Decimal):
if fee.amount >= 0 and int(fee.amount*1000) < 9223372036854775807:
claim_record['fee_amount'] = int(fee.amount*1000) claim_record['fee_amount'] = int(fee.amount*1000)
elif claim.is_repost: elif claim.is_repost:
claim_record['claim_type'] = CLAIM_TYPES['repost'] claim_record['claim_type'] = CLAIM_TYPES['repost']