Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BitsharesOrderEngine and BitsharesPriceFeed inconsistent attributes #596

Closed
bitphage opened this issue May 19, 2019 · 9 comments
Closed
Assignees

Comments

@bitphage
Copy link
Collaborator

BitsharesOrderEngine uses attributes which are not defined in __init__ (or elsewhere):

  • self.account
  • self.market
  • self.worker

This means methods which uses these attrs are broken on standalone BitsharesOrderEngine. Now we're don't noticing this because the only user of BitsharesOrderEngine is StrategyBase. All these attrs defined inside StrategyBase.

@bitphage
Copy link
Collaborator Author

BitsharesPriceFeed:

  • self.market

@bitphage bitphage changed the title BitsharesOrderEngine inconsistent attributes BitsharesOrderEngine and BitsharesPriceFeed inconsistent attributes May 19, 2019
@bitphage
Copy link
Collaborator Author

I think it's a good idea to have this fixed after or at the same time as merging tests for BitsharesOrderEngine and BitsharesPriceFeed.

@thehapax
Copy link
Collaborator

Yep, we are aware of that. Adding @bitProfessor to the conversation

@thehapax
Copy link
Collaborator

Will fix this on next set of pulls.

@thehapax thehapax self-assigned this May 19, 2019
thehapax added a commit to thehapax/DEXBot that referenced this issue Jun 17, 2019
@bitProfessor
Copy link
Collaborator

I think it's a good idea to wait until the order engine is updated to the devel branch.

@bitphage
Copy link
Collaborator Author

bitphage commented Jun 19, 2019

This issue still wasn't addressed properly, looks like without tests it's hard to detect was the fix right or not.

BitsharesOrderEngine in __init__ sets self.account = account while it's still overridden in StrategyBase by property def account(self).

@thehapax
Copy link
Collaborator

I think it's a good idea to wait until the order engine is updated to the devel branch.
it is now merged into the devel @bitProfessor

@bitfag perhaps we should remove all overriding properties in StrategyBase, is this what you mean?

@thehapax
Copy link
Collaborator

thehapax commented Jun 20, 2019

@bitfag i made changes, see https://github.com/thehapax/DEXBot/tree/596-properties

@bitphage
Copy link
Collaborator Author

Not sure, I'd rather wait for tests to clearly see everything working as it should.

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

No branches or pull requests

3 participants