Open RuneStone0 opened 4 years ago
super helpful, thanks!
Any ETA on this or can I somehow help with this?
I was looking for a more general solution, however, the way that @Blockchain.inject
works, is that it initialized stuff already. Couldn't find an easy approach just yet, sorry.
In the meantime, you may just install your own patch and work with that.
Background: I'm running python-bitshares on Google AppEngine, which doesn't allow writes to disk, causing exceptions because python-bitshares attempt to write the sqlite database to disk. This happens, even if BitShares() is initialized with keys:
bitshares = BitShares(node=mynode, keys=[mykey])
Root Cause: This line:
self.config = kwargs.get("config_store", SqliteConfigurationStore(**kwargs))
(reference) is executed when a newBitShares()
instance is created, resulting in disk writes.This happens even if
config_store
is set while creating a newBitShares()
instance like below:I suspect that
kwargs.get()
is causing this issue. For some reason it will call the default value even if another value is parsed to it (in this caseSqliteConfigurationStore()
). OnceSqliteConfigurationStore()
is called a folder will be created on disk (reference)I'm not sure what the best way to fix this, I went with a quick hack:
and then patched sqlite.py (adding the first line below):