Fixing parsing of initTokens
This commit is contained in:
parent
c6841d4e73
commit
f9f1525291
@ -1,4 +1,4 @@
|
||||
[DEFAULT]
|
||||
NET = mainnet
|
||||
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:
|
||||
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)
|
||||
|
||||
@ -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()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user