From 911f483ce355200e1658901639367ce524140016 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 9 Sep 2022 11:01:56 -0400 Subject: [PATCH] multi_put claim_short_id --- hub/scribe/service.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hub/scribe/service.py b/hub/scribe/service.py index 384db57..6698c3a 100644 --- a/hub/scribe/service.py +++ b/hub/scribe/service.py @@ -419,11 +419,14 @@ class BlockchainProcessorService(BlockchainService): ) # short url resolution - for prefix_len in range(10): - self.db.prefix_db.claim_short_id.stage_put( - (pending.normalized_name, pending.claim_hash.hex()[:prefix_len + 1], - pending.root_tx_num, pending.root_position), - (pending.tx_num, pending.position) + self.db.prefix_db.claim_short_id.stage_multi_put( + [ + ( + (pending.normalized_name, pending.claim_hash.hex()[:prefix_len + 1], + pending.root_tx_num, pending.root_position), + (pending.tx_num, pending.position) + ) for prefix_len in range(10) + ] ) if pending.signing_hash and pending.channel_signature_is_valid: