Skip to content

Commit

Permalink
disable bonded history in canary
Browse files Browse the repository at this point in the history
  • Loading branch information
HarukaMa committed Dec 13, 2024
1 parent 24d6a81 commit a027822
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions db/insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,12 @@ async def _update_committee_bonded_delegated_map(
await self.redis.delete("credits.aleo:bonded")
await self.redis.hset("credits.aleo:bonded", mapping={k: json.dumps(v) for k, v in bonded_mapping.items()})
await self.redis.execute_command("EXEC") # type: ignore
await cur.execute(
"INSERT INTO mapping_bonded_history (height, content) VALUES (%s, %s) RETURNING id",
(height, json.dumps({str(i["key"]): i["value"].dump().hex() for i in global_mapping_cache[bonded_mapping_id].values()}))
)
from node import Network
if Network.network_id != 2:
await cur.execute(
"INSERT INTO mapping_bonded_history (height, content) VALUES (%s, %s) RETURNING id",
(height, json.dumps({str(i["key"]): i["value"].dump().hex() for i in global_mapping_cache[bonded_mapping_id].values()}))
)

global_mapping_cache[delegated_mapping_id] = {}
delegated_mapping: dict[str, dict[str, str]] = {}
Expand Down

0 comments on commit a027822

Please sign in to comment.