added check of blocks in local dbs before the global one