5
5
#ifndef BITCOIN_QML_CHAINMODEL_H
6
6
#define BITCOIN_QML_CHAINMODEL_H
7
7
8
+ #include < chainparams.h>
8
9
#include < interfaces/chain.h>
9
10
10
11
#include < QObject>
@@ -23,13 +24,17 @@ class ChainModel : public QObject
23
24
{
24
25
Q_OBJECT
25
26
Q_PROPERTY (QString currentNetworkName READ currentNetworkName WRITE setCurrentNetworkName NOTIFY currentNetworkNameChanged)
27
+ Q_PROPERTY (quint64 assumedBlockchainSize READ assumedBlockchainSize CONSTANT)
28
+ Q_PROPERTY (quint64 assumedChainstateSize READ assumedChainstateSize CONSTANT)
26
29
Q_PROPERTY (QVariantList timeRatioList READ timeRatioList NOTIFY timeRatioListChanged)
27
30
28
31
public:
29
32
explicit ChainModel (interfaces::Chain& chain);
30
33
31
34
QString currentNetworkName () const { return m_current_network_name; };
32
35
void setCurrentNetworkName (QString network_name);
36
+ quint64 assumedBlockchainSize () const { return m_assumed_blockchain_size; };
37
+ quint64 assumedChainstateSize () const { return m_assumed_chainstate_size; };
33
38
QVariantList timeRatioList () const { return m_time_ratio_list; };
34
39
35
40
int timestampAtMeridian ();
@@ -46,6 +51,8 @@ public Q_SLOTS:
46
51
47
52
private:
48
53
QString m_current_network_name;
54
+ quint64 m_assumed_blockchain_size{ Params ().AssumedBlockchainSize () };
55
+ quint64 m_assumed_chainstate_size{ Params ().AssumedChainStateSize () };
49
56
/* time_ratio: Ratio between the time at which an event
50
57
* happened and 12 hours. So, for example, if a block is
51
58
* found at 4 am or pm, the time_ratio would be 0.3.
0 commit comments