Skip to content

Commit

Permalink
revert extra logs
Browse files Browse the repository at this point in the history
  • Loading branch information
almogdepaz committed Dec 2, 2024
1 parent 7deca59 commit ab3b645
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions chia/wallet/wallet_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ async def new_valid_weight_proof(self, weight_proof: WeightProof, records: list[
await self._basic_store.set_object("SYNCED_WEIGHT_PROOF", weight_proof)
latest_timestamp = self._latest_timestamp
for record in records:
log.info(f"almog1 add {record.height}")
self._height_to_hash[record.height] = record.header_hash
self.add_block_record(record)
if record.is_transaction_block:
Expand Down Expand Up @@ -128,7 +127,6 @@ async def add_block(self, block: HeaderBlock) -> tuple[AddBlockResult, Optional[
latest_timestamp = block_record.timestamp
else:
latest_timestamp = None
log.info(f"almog2 add {block_record.height}")
self._height_to_hash[block_record.height] = block_record.header_hash
await self.set_peak_block(block, latest_timestamp)
return AddBlockResult.NEW_PEAK, None
Expand All @@ -141,7 +139,6 @@ async def add_block(self, block: HeaderBlock) -> tuple[AddBlockResult, Optional[
curr_record: BlockRecord = block_record
latest_timestamp = self._latest_timestamp
while curr_record.height > fork_height:
log.info(f"almog3 add {block_record.height}")
self._height_to_hash[curr_record.height] = curr_record.header_hash
if curr_record.timestamp is not None and curr_record.timestamp > latest_timestamp:
latest_timestamp = curr_record.timestamp
Expand All @@ -159,9 +156,7 @@ async def _rollback_to_height(self, height: int) -> None:
if self._peak is None:
return
for h in range(max(0, height + 1), self._peak.height + 1):
log.info(f"wtf remove block {h}")
del self._height_to_hash[uint32(h)]

await self._basic_store.remove_object("PEAK_BLOCK")

async def set_peak_block(self, block: HeaderBlock, timestamp: Optional[uint64] = None) -> None:
Expand Down Expand Up @@ -208,8 +203,6 @@ def get_peak_height(self) -> Optional[uint32]:
return self._peak.height

def height_to_hash(self, height: uint32) -> bytes32:
if height not in self._height_to_hash:
print("fuck")
return self._height_to_hash[height]

def try_block_record(self, header_hash: bytes32) -> Optional[BlockRecord]:
Expand Down

0 comments on commit ab3b645

Please sign in to comment.