File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,8 @@ def __init__(self,
67
67
:param ha: tuple of host and port
68
68
"""
69
69
self .config = config or getConfig ()
70
- basedirpath = self .config .baseDir if not basedirpath else basedirpath
71
- self . basedirpath = basedirpath
70
+ self . basedirpath = basedirpath or os . path . join ( self .config .baseDir ,
71
+ self . config . NETWORK_NAME )
72
72
73
73
signer = Signer (sighex )
74
74
sighex = signer .keyraw
@@ -82,9 +82,9 @@ def __init__(self,
82
82
83
83
cha = None
84
84
# If client information already exists is RAET then use that
85
- if self .exists (self .stackName , basedirpath ):
85
+ if self .exists (self .stackName , self . basedirpath ):
86
86
cha = self .nodeStackClass .getHaFromLocal (
87
- self .stackName , basedirpath )
87
+ self .stackName , self . basedirpath )
88
88
if cha :
89
89
cha = HA (* cha )
90
90
logger .debug ("Client {} ignoring given ha {} and using {}" .
Original file line number Diff line number Diff line change 24
24
('DeltaC' , ('127.0.0.1' , 9708 ))
25
25
])
26
26
27
- baseDir = '~/.plenum/networks/ '
27
+ baseDir = '~/.plenum/'
28
28
walletsDir = 'wallets'
29
+ NODE_BASE_DATA_DIR = '/var/plenum'
29
30
nodeDataDir = 'data/nodes'
30
31
clientDataDir = 'data/clients'
31
32
LOG_DIR = '/var/log/plenum/'
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ def __init__(self,
110
110
cliname : str = None ,
111
111
cliha : HA = None ,
112
112
basedirpath : str = None ,
113
+ base_data_dir : str = None ,
113
114
primaryDecider : PrimaryDecider = None ,
114
115
pluginPaths : Iterable [str ]= None ,
115
116
storage : Storage = None ,
@@ -128,12 +129,14 @@ def __init__(self,
128
129
self .created = time .time ()
129
130
self .name = name
130
131
self .config = config or getConfig ()
131
- self .basedirpath = basedirpath or config .baseDir
132
+ self .basedirpath = basedirpath or os . path . join ( config .baseDir , config . NETWORK_NAME )
132
133
self .dataDir = self .config .nodeDataDir or "data/nodes"
134
+ self .base_data_dir = base_data_dir or os .path .join (self .config .NODE_BASE_DATA_DIR ,
135
+ config .NETWORK_NAME )
133
136
134
137
self ._view_change_timeout = self .config .VIEW_CHANGE_TIMEOUT
135
138
136
- HasFileStorage .__init__ (self , name , baseDir = self .basedirpath ,
139
+ HasFileStorage .__init__ (self , name , baseDir = self .base_data_dir ,
137
140
dataDir = self .dataDir )
138
141
self .ensureKeysAreSetup ()
139
142
self .opVerifiers = self .getPluginsByType (pluginPaths ,
You can’t perform that action at this time.
0 commit comments