-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Description
In Order: order = self.blockchain.rpc.get_objects([args[0]])[0]
self.blockchain here is a property of AbstractBlockchainInstanceProvider, and self._blockchain attr is not set, thus a new bitshares instance (shared) is being initializing effectively connecting to the default node:
> /home/vvk/devel/bitshares/python-bitshares/bitshares/price.py(109)__init__()
-> order = self.blockchain.rpc.get_objects([args[0]])[0]
(Pdb) step
--Call--
> /home/vvk/devel/bitshares/python-graphenelib/graphenecommon/instance.py(54)blockchain()
-> @property
(Pdb) next
> /home/vvk/devel/bitshares/python-graphenelib/graphenecommon/instance.py(56)blockchain()
-> if hasattr(self, "_blockchain") and self._blockchain:
(Pdb) step
> /home/vvk/devel/bitshares/python-graphenelib/graphenecommon/instance.py(60)blockchain()
-> return self.shared_blockchain_instance()
I did a quick workaround locally like this, not sure this is right fix:
--- a/bitshares/price.py
+++ b/bitshares/price.py
@@ -106,6 +106,7 @@ class Order(Price):
if len(args) == 1 and isinstance(args[0], str):
""" Load from id
"""
+ self._blockchain = kwargs.get('blockchain_instance')
order = self.blockchain.rpc.get_objects([args[0]])[0]
if order:
Price.__init__(self, order["sell_price"])Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels