fix bug on empty db

pull/22/head
lza_menace 2 years ago
parent 29ead85025
commit 33a6a9b8a2

@ -127,4 +127,7 @@ def get_highest_block(nettype, crypto):
Node.nettype == nettype,
Node.crypto == crypto
).order_by(Node.last_height.desc()).limit(1).first()
if highest:
return highest.last_height
else:
return 0

Loading…
Cancel
Save