Skip to content

retry_action looses ops when invoked with self.execute #773

Description

@bitphage

execute() is broadcasting transactions from current txbuffer, while retry_action() clears txbuffer on retry.

Traceback (most recent call last):
  File "/home/vvk/devel/DEXBot-prod/dexbot/worker.py", line 131, in on_block
    self.workers[worker_name].ontick(data)
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.7/site-packages/events/events.py", line 95, in __call__
    f(*a, **kw)
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/staggered_orders.py", line 2248, in tick
    self.maintain_strategy()
  File "/home/vvk/devel/DEXBot-prod/dexbot/decorators.py", line 21, in wrapper
    func(self, *args, **kwargs)
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/staggered_orders.py", line 197, in maintain_strategy
    trx = self.retry_action(self.execute)
  File "/home/vvk/devel/DEXBot-prod/dexbot/orderengines/bitshares_engine.py", line 692, in retry_action
    return action(*args, **kwargs)
  File "/home/vvk/devel/DEXBot-prod/dexbot/orderengines/bitshares_engine.py", line 510, in execute
    r = self.bitshares.txbuffer.broadcast()
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.7/site-packages/graphenecommon/transactionbuilder.py", line 514, in broadcast
    raise e
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.7/site-packages/graphenecommon/transactionbuilder.py", line 508, in broadcast
    ret, api="network_broadcast"
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.7/site-packages/grapheneapi/api.py", line 176, in func
    self.post_process_exception(e)
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.7/site-packages/bitsharesapi/bitsharesnoderpc.py", line 24, in post_process_e
xception
    raise exceptions.UnhandledRPCError(msg)
bitsharesapi.exceptions.UnhandledRPCError: operations.size() > 0: A transaction must have at least one operation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions