Fixing parsing of initTokens

This commit is contained in:
Vivek Teega 2019-04-22 14:44:19 +05:30
parent c6841d4e73
commit f9f1525291
4 changed files with 12 additions and 8 deletions

View File

@ -1,4 +1,4 @@
[DEFAULT]
NET = mainnet
FLO_CLI_PATH = /usr/local/bin/flo-cli
START_BLOCK = 3387900
START_BLOCK = 3387900

View File

@ -90,6 +90,9 @@ def extractInitTokens(text):
if textList[idx + 1] in base_units:
value = result * base_units[textList[idx + 1]]
counter = counter + 1
else:
value = result
counter = counter + 1
except:
for unit in base_units:
result = word.split(unit)

BIN
system.db

Binary file not shown.

View File

@ -198,6 +198,7 @@ def startWorking(transaction_data, parsed_data):
continue
if item[0] != temp:
print('System has found more than one address as part of vin')
print('This transaction will be rejected')
return
inputlist = [vinlist[0][0], totalinputval]
@ -475,11 +476,11 @@ for blockindex in range( startblock, current_index ):
print(parsed_data['type'])
startWorking(transaction_data, parsed_data)
engine = create_engine('sqlite:///system.db')
SystemBase.metadata.create_all(bind=engine)
session = sessionmaker(bind=engine)()
entry = session.query(SystemData).filter(SystemData.attribute == 'lastblockscanned').all()[0]
entry.value = str(blockindex)
session.commit()
session.close()
engine = create_engine('sqlite:///system.db')
SystemBase.metadata.create_all(bind=engine)
session = sessionmaker(bind=engine)()
entry = session.query(SystemData).filter(SystemData.attribute == 'lastblockscanned').all()[0]
entry.value = str(blockindex)
session.commit()
session.close()