diff --git a/snet/cli/commands/mpe_channel.py b/snet/cli/commands/mpe_channel.py index 063dc039..e2d5be02 100644 --- a/snet/cli/commands/mpe_channel.py +++ b/snet/cli/commands/mpe_channel.py @@ -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(): @@ -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