1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
crateix!;
//-------------------------------------------[.cpp/bitcoin/src/txdb.h]
//-------------------------------------------[.cpp/bitcoin/src/txdb.cpp]
/**
| -dbcache default (MiB)
|
*/
pub const N_DEFAULT_DB_CACHE: usize = 450;
/**
| -dbbatchsize default (bytes)
|
*/
pub const N_DEFAULT_DB_BATCH_SIZE: usize = 16 << 20;
/**
| max. -dbcache (MiB)
|
*/
pub const N_MAX_DB_CACHE: usize = ternary!;
/**
| min. -dbcache (MiB)
|
*/
pub const N_MIN_DB_CACHE: usize = 4;
/**
| Max memory allocated to block tree DB
| specific cache, if no -txindex (MiB)
|
*/
pub const N_MAX_BLOCK_DB_CACHE: usize = 2;
/**
| Max memory allocated to block tree DB specific
| cache, if -txindex (MiB)
|
| Unlike for the UTXO database, for the txindex
| scenario the leveldb cache make a meaningful
| difference:
| https://github.com/bitcoin/bitcoin/pull/8273#issuecomment-229601991
*/
pub const N_MAX_TX_INDEX_CACHE: usize = 1024;
/**
| Max memory allocated to all block filter
| index caches combined in MiB.
|
*/
pub const MAX_FILTER_INDEX_CACHE: usize = 1024;
/**
| Max memory allocated to coin DB specific
| cache (MiB)
|
*/
pub const N_MAX_COINS_DB_CACHE: usize = 8;
/**
| Actually declared in validation.cpp;
| can't include because of circular dependency.
|
*/
lazy_static!