File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 10
10
#include < QTime>
11
11
#include < interfaces/chain.h>
12
12
13
+ using interfaces::FoundBlock;
14
+
13
15
ChainModel::ChainModel (interfaces::Chain& chain)
14
16
: m_chain{chain}
15
17
{
@@ -77,7 +79,10 @@ void ChainModel::setTimeRatioListInitial()
77
79
}
78
80
79
81
for (int height = first_block_height; height < active_chain_height + 1 ; height++) {
80
- m_time_ratio_list.push_back (double (m_chain.getBlockTime (height) - time_at_meridian) / SECS_IN_12_HOURS);
82
+ uint256 block_hash{m_chain.getBlockHash (height)};
83
+ int64_t block_time;
84
+ m_chain.findBlock (block_hash, FoundBlock ().time (block_time));
85
+ m_time_ratio_list.push_back (double (block_time - time_at_meridian) / SECS_IN_12_HOURS);
81
86
}
82
87
83
88
Q_EMIT timeRatioListChanged ();
You can’t perform that action at this time.
0 commit comments