[FEATURE] Get and set last hash in database.