Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions snet/sdk/mpe/payment_channel_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, w3, mpe_contract):

def update_cache(self):
channels = []
last_read_block = self.deployment_block
last_read_block = self.deployment_block - 1

if not self.channels_file.exists():
print(f"Channels cache is empty. Caching may take some time when first accessing channels.\nCaching in progress...")
Expand All @@ -45,7 +45,7 @@ def update_cache(self):
current_block_number = self.web3.eth.block_number

if last_read_block < current_block_number:
new_channels = self._get_all_channels_from_blockchain_logs_to_dicts(last_read_block, current_block_number)
new_channels = self._get_all_channels_from_blockchain_logs_to_dicts(last_read_block + 1, current_block_number)
channels = channels + new_channels
last_read_block = current_block_number

Expand Down
Loading