Fixing parsing of initTokens
This commit is contained in:
parent
c6841d4e73
commit
f9f1525291
@ -1,4 +1,4 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
NET = mainnet
|
NET = mainnet
|
||||||
FLO_CLI_PATH = /usr/local/bin/flo-cli
|
FLO_CLI_PATH = /usr/local/bin/flo-cli
|
||||||
START_BLOCK = 3387900
|
START_BLOCK = 3387900
|
||||||
|
|||||||
@ -90,6 +90,9 @@ def extractInitTokens(text):
|
|||||||
if textList[idx + 1] in base_units:
|
if textList[idx + 1] in base_units:
|
||||||
value = result * base_units[textList[idx + 1]]
|
value = result * base_units[textList[idx + 1]]
|
||||||
counter = counter + 1
|
counter = counter + 1
|
||||||
|
else:
|
||||||
|
value = result
|
||||||
|
counter = counter + 1
|
||||||
except:
|
except:
|
||||||
for unit in base_units:
|
for unit in base_units:
|
||||||
result = word.split(unit)
|
result = word.split(unit)
|
||||||
|
|||||||
@ -198,6 +198,7 @@ def startWorking(transaction_data, parsed_data):
|
|||||||
continue
|
continue
|
||||||
if item[0] != temp:
|
if item[0] != temp:
|
||||||
print('System has found more than one address as part of vin')
|
print('System has found more than one address as part of vin')
|
||||||
|
print('This transaction will be rejected')
|
||||||
return
|
return
|
||||||
|
|
||||||
inputlist = [vinlist[0][0], totalinputval]
|
inputlist = [vinlist[0][0], totalinputval]
|
||||||
@ -475,11 +476,11 @@ for blockindex in range( startblock, current_index ):
|
|||||||
print(parsed_data['type'])
|
print(parsed_data['type'])
|
||||||
startWorking(transaction_data, parsed_data)
|
startWorking(transaction_data, parsed_data)
|
||||||
|
|
||||||
engine = create_engine('sqlite:///system.db')
|
engine = create_engine('sqlite:///system.db')
|
||||||
SystemBase.metadata.create_all(bind=engine)
|
SystemBase.metadata.create_all(bind=engine)
|
||||||
session = sessionmaker(bind=engine)()
|
session = sessionmaker(bind=engine)()
|
||||||
entry = session.query(SystemData).filter(SystemData.attribute == 'lastblockscanned').all()[0]
|
entry = session.query(SystemData).filter(SystemData.attribute == 'lastblockscanned').all()[0]
|
||||||
entry.value = str(blockindex)
|
entry.value = str(blockindex)
|
||||||
session.commit()
|
session.commit()
|
||||||
session.close()
|
session.close()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user