File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
- from graphenecommon .instance import AbstractBlockchainInstanceProvider , SharedInstance
2
+ from graphenecommon .instance import AbstractBlockchainInstanceProvider
3
+
4
+
5
+ class SharedInstance :
6
+ """ This class merely offers a singelton for the Blockchain Instance
7
+ """
8
+
9
+ instance = None
10
+ config = {}
3
11
4
12
5
13
class BlockchainInstance (AbstractBlockchainInstanceProvider ):
6
14
""" This is a class that allows compatibility with previous
7
15
naming conventions
8
16
"""
9
17
18
+ _sharedInstance = SharedInstance
19
+
10
20
def __init__ (self , * args , ** kwargs ):
11
21
# Also allow 'bitshares_instance'
12
22
if kwargs .get ("bitshares_instance" ):
@@ -33,11 +43,12 @@ def shared_blockchain_instance():
33
43
34
44
def set_shared_blockchain_instance (instance ):
35
45
instance .clear_cache ()
36
- instance .set_shared_instance ()
46
+ # instance.set_shared_instance()
47
+ BlockchainInstance .set_shared_blockchain_instance (instance )
37
48
38
49
39
50
def set_shared_config (config ):
40
- shared_blockchain_instance () .set_shared_config (config )
51
+ BlockchainInstance .set_shared_config (config )
41
52
42
53
43
54
shared_bitshares_instance = shared_blockchain_instance
You can’t perform that action at this time.
0 commit comments