Merge branch 'master' into integration_test_setup_cleanup_timeouts
This commit is contained in:
commit
e00c3db71a
3 changed files with 8 additions and 6 deletions
|
@ -1524,10 +1524,11 @@ class BlockProcessor:
|
|||
self.db.tx_counts.append(self.tx_count)
|
||||
|
||||
cached_max_reorg_depth = self.daemon.cached_height() - self.env.reorg_limit
|
||||
if height >= cached_max_reorg_depth:
|
||||
self.db.prefix_db.touched_or_deleted.stage_put(
|
||||
key_args=(height,), value_args=(self.touched_claim_hashes, self.removed_claim_hashes)
|
||||
)
|
||||
|
||||
# if height >= cached_max_reorg_depth:
|
||||
self.db.prefix_db.touched_or_deleted.stage_put(
|
||||
key_args=(height,), value_args=(self.touched_claim_hashes, self.removed_claim_hashes)
|
||||
)
|
||||
|
||||
self.height = height
|
||||
self.db.headers.append(block.header)
|
||||
|
@ -1556,7 +1557,6 @@ class BlockProcessor:
|
|||
now = time.time()
|
||||
self.db.wall_time += now - self.db.last_flush
|
||||
self.db.last_flush = now
|
||||
|
||||
self.db.write_db_state()
|
||||
|
||||
def clear_after_advance_or_reorg(self):
|
||||
|
|
|
@ -11,6 +11,7 @@ from lbry.wallet.server.db.elasticsearch.constants import ALL_FIELDS
|
|||
|
||||
|
||||
async def get_recent_claims(env, index_name='claims', db=None):
|
||||
log = logging.getLogger()
|
||||
need_open = db is None
|
||||
db = db or LevelDB(env)
|
||||
try:
|
||||
|
@ -20,6 +21,7 @@ async def get_recent_claims(env, index_name='claims', db=None):
|
|||
return
|
||||
if need_open:
|
||||
await db.initialize_caches()
|
||||
log.info(f"catching up ES ({db.es_sync_height}) to leveldb height: {db.db_height}")
|
||||
cnt = 0
|
||||
touched_claims = set()
|
||||
deleted_claims = set()
|
||||
|
|
|
@ -105,4 +105,4 @@ if __name__ == '__main__':
|
|||
"Format: host:port Example: lbrynet1.lbry.com:4444")
|
||||
parser.add_argument("--metrics_port", default=0, type=int, help="Port for Prometheus and raw CSV metrics. 0 to disable. Default: 0")
|
||||
args = parser.parse_args()
|
||||
asyncio.run(main(args.host, args.port, args.db_file, args.bootstrap_node, args.prometheus_port))
|
||||
asyncio.run(main(args.host, args.port, args.db_file, args.bootstrap_node, args.metrics_port))
|
||||
|
|
Loading…
Reference in a new issue