Skip to content
Merged
Show file tree
Hide file tree
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
24 changes: 0 additions & 24 deletions proxy/common_neon/neon_instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 4 additions & 6 deletions proxy/common_neon/transaction_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}")
Expand Down Expand Up @@ -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)
Expand Down