|
11 | 11 | #include <arith_uint256.h>
|
12 | 12 | #include <chain.h>
|
13 | 13 | #include <checkqueue.h>
|
14 |
| -#include <common/args.h> |
15 | 14 | #include <consensus/amount.h>
|
16 | 15 | #include <consensus/consensus.h>
|
17 | 16 | #include <consensus/merkle.h>
|
@@ -2500,7 +2499,7 @@ bool Chainstate::FlushStateToDisk(
|
2500 | 2499 | // Write blocks and block index to disk.
|
2501 | 2500 | if (fDoFullFlush || fPeriodicWrite) {
|
2502 | 2501 | // Ensure we can write block index
|
2503 |
| - if (!CheckDiskSpace(gArgs.GetBlocksDirPath())) { |
| 2502 | + if (!CheckDiskSpace(m_blockman.m_opts.blocks_dir)) { |
2504 | 2503 | return AbortNode(state, "Disk space is too low!", _("Disk space is too low!"));
|
2505 | 2504 | }
|
2506 | 2505 | {
|
@@ -2536,7 +2535,7 @@ bool Chainstate::FlushStateToDisk(
|
2536 | 2535 | // twice (once in the log, and once in the tables). This is already
|
2537 | 2536 | // an overestimation, as most will delete an existing entry or
|
2538 | 2537 | // overwrite one. Still, use a conservative safety factor of 2.
|
2539 |
| - if (!CheckDiskSpace(gArgs.GetDataDirNet(), 48 * 2 * 2 * CoinsTip().GetCacheSize())) { |
| 2538 | + if (!CheckDiskSpace(m_chainman.m_options.datadir, 48 * 2 * 2 * CoinsTip().GetCacheSize())) { |
2540 | 2539 | return AbortNode(state, "Disk space is too low!", _("Disk space is too low!"));
|
2541 | 2540 | }
|
2542 | 2541 | // Flush the chainstate (which may refer to block index entries).
|
|
0 commit comments