diff --git a/proxy/common_neon/neon_instruction.py b/proxy/common_neon/neon_instruction.py index db6066fa7..853f6f7c0 100644 --- a/proxy/common_neon/neon_instruction.py +++ b/proxy/common_neon/neon_instruction.py @@ -283,30 +283,6 @@ def make_noniterative_call_transaction(self, length_before: int = 0) -> Transact return trx - def make_continue_transaction(self, steps, index=None) -> Transaction: - data = bytearray.fromhex("14") + self.collateral_pool_index_buf + steps.to_bytes(8, byteorder="little") - if index: - data = data + index.to_bytes(8, byteorder="little") - - return Transaction().add(TransactionInstruction( - program_id = EVM_LOADER_ID, - data = data, - keys = [ - AccountMeta(pubkey=self.storage, is_signer=False, is_writable=True), - - AccountMeta(pubkey=self.operator_account, is_signer=True, is_writable=True), - AccountMeta(pubkey=self.collateral_pool_address, is_signer=False, is_writable=True), - AccountMeta(pubkey=self.operator_neon_address, is_signer=False, is_writable=True), - AccountMeta(pubkey=self.caller_token, is_signer=False, is_writable=True), - AccountMeta(pubkey=SYS_PROGRAM_ID, is_signer=False, is_writable=False), - - ] + self.eth_accounts + [ - - AccountMeta(pubkey=SYSVAR_INSTRUCTION_PUBKEY, is_signer=False, is_writable=False), - ] + obligatory_accounts - )) - - def make_cancel_transaction(self) -> Transaction: return Transaction().add(TransactionInstruction( program_id = EVM_LOADER_ID, diff --git a/proxy/common_neon/transaction_sender.py b/proxy/common_neon/transaction_sender.py index c78d74d2a..235419282 100644 --- a/proxy/common_neon/transaction_sender.py +++ b/proxy/common_neon/transaction_sender.py @@ -424,7 +424,7 @@ def call_continue_step_by_step(self): def call_continue_step(self): step_count = self.steps while step_count > 0: - trx = self.instruction.make_continue_transaction(step_count) + trx = self.make_combined_trx(step_count, 0) logger.debug("Step count {}".format(step_count)) try: @@ -453,7 +453,7 @@ def call_continue_bucked(self): receipts = [] for index in range(math.ceil(self.steps_emulated/self.steps) + self.addition_count()): try: - trx = self.make_bucked_trx(steps, index) + trx = self.make_combined_trx(steps, index) receipts.append(self.sender.send_transaction_unconfirmed(trx)) except SendTransactionError as err: logger.error(f"Failed to call continue bucked, error: {err.result}") @@ -488,10 +488,8 @@ def addition_count(self): return addition_count - def make_bucked_trx(self, steps, index): - if self.instruction_type == self.CONTINUE_REGULAR: - return self.instruction.make_continue_transaction(steps, index) - elif self.instruction_type == self.CONTINUE_COMBINED: + def make_combined_trx(self, steps, index): + if self.instruction_type == self.CONTINUE_COMBINED: return self.instruction.make_partial_call_or_continue_transaction(steps - index) elif self.instruction_type == self.CONTINUE_HOLDER_COMB: return self.instruction.make_partial_call_or_continue_from_account_data(steps, index)