File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ class NodeImpl : public Node
113
113
LOCK (::cs_main);
114
114
tip = ::chainActive.Tip ();
115
115
}
116
- return GuessVerificationProgress (:: Params ().TxData (), tip);
116
+ return GuessVerificationProgress (Params ().TxData (), tip);
117
117
}
118
118
bool isInitialBlockDownload () override { return IsInitialBlockDownload (); }
119
119
bool getReindex () override { return ::fReindex ; }
@@ -166,15 +166,15 @@ class NodeImpl : public Node
166
166
{
167
167
return MakeHandler (::uiInterface.NotifyBlockTip .connect ([fn](bool initial_download, const CBlockIndex* block) {
168
168
fn (initial_download, block->nHeight , block->GetBlockTime (),
169
- GuessVerificationProgress (:: Params ().TxData (), block));
169
+ GuessVerificationProgress (Params ().TxData (), block));
170
170
}));
171
171
}
172
172
std::unique_ptr<Handler> handleNotifyHeaderTip (NotifyHeaderTipFn fn) override
173
173
{
174
174
return MakeHandler (
175
175
::uiInterface.NotifyHeaderTip .connect ([fn](bool initial_download, const CBlockIndex* block) {
176
176
fn (initial_download, block->nHeight , block->GetBlockTime (),
177
- GuessVerificationProgress (:: Params ().TxData (), block));
177
+ GuessVerificationProgress (Params ().TxData (), block));
178
178
}));
179
179
}
180
180
};
Original file line number Diff line number Diff line change @@ -602,7 +602,7 @@ int main(int argc, char *argv[])
602
602
603
603
// / 5. Now that settings and translations are available, ask user for data directory
604
604
// User language is set up: pick a data directory
605
- if (!Intro::pickDataDirectory ())
605
+ if (!Intro::pickDataDirectory (*node ))
606
606
return EXIT_SUCCESS;
607
607
608
608
// / 6. Determine availability of data and blocks directory and parse bitcoin.conf
Original file line number Diff line number Diff line change 12
12
13
13
#include < qt/guiutil.h>
14
14
15
+ #include < interface/node.h>
15
16
#include < util.h>
16
17
17
18
#include < QFileDialog>
@@ -186,7 +187,7 @@ QString Intro::getDefaultDataDirectory()
186
187
return GUIUtil::boostPathToQString (GetDefaultDataDir ());
187
188
}
188
189
189
- bool Intro::pickDataDirectory ()
190
+ bool Intro::pickDataDirectory (interface::Node& node )
190
191
{
191
192
QSettings settings;
192
193
/* If data directory provided on command line, no need to look at settings
@@ -233,8 +234,9 @@ bool Intro::pickDataDirectory()
233
234
* override -datadir in the bitcoin.conf file in the default data directory
234
235
* (to be consistent with bitcoind behavior)
235
236
*/
236
- if (dataDir != getDefaultDataDirectory ())
237
- gArgs .SoftSetArg (" -datadir" , GUIUtil::qstringToBoostPath (dataDir).string ()); // use OS locale for path setting
237
+ if (dataDir != getDefaultDataDirectory ()) {
238
+ node.softSetArg (" -datadir" , GUIUtil::qstringToBoostPath (dataDir).string ()); // use OS locale for path setting
239
+ }
238
240
return true ;
239
241
}
240
242
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ static const bool DEFAULT_CHOOSE_DATADIR = false;
13
13
14
14
class FreespaceChecker ;
15
15
16
+ namespace interface {
17
+ class Node ;
18
+ }
19
+
16
20
namespace Ui {
17
21
class Intro ;
18
22
}
@@ -41,7 +45,7 @@ class Intro : public QDialog
41
45
* @note do NOT call global GetDataDir() before calling this function, this
42
46
* will cause the wrong path to be cached.
43
47
*/
44
- static bool pickDataDirectory ();
48
+ static bool pickDataDirectory (interface::Node& node );
45
49
46
50
/* *
47
51
* Determine default data directory for operating system.
You can’t perform that action at this time.
0 commit comments