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/cli/commands/mpe_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _get_channels_cache_file(self):

def _update_channels_cache(self):
channels = []
last_read_block = get_contract_deployment_block(self.ident.w3, "MultiPartyEscrow")
last_read_block = get_contract_deployment_block(self.ident.w3, "MultiPartyEscrow") - 1
channels_file = self._get_channels_cache_file()

if not channels_file.exists():
Expand All @@ -59,7 +59,7 @@ def _update_channels_cache(self):
current_block_number = self.ident.w3.eth.block_number

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

Expand Down
Loading