File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,9 @@ class Chain
139
139
// ! Get block hash. Height must be valid or this function will abort.
140
140
virtual uint256 getBlockHash (int height) = 0;
141
141
142
+ // ! Get block time, Height must be valid or this function will abort.
143
+ virtual int64_t getBlockTime (int height) = 0;
144
+
142
145
// ! Check that the block is available on disk (i.e. has not been
143
146
// ! pruned), and contains transactions.
144
147
virtual bool haveBlockOnDisk (int height) = 0;
Original file line number Diff line number Diff line change @@ -555,6 +555,11 @@ class ChainImpl : public Chain
555
555
LOCK (::cs_main);
556
556
return Assert (chainman ().ActiveChain ()[height])->GetBlockHash ();
557
557
}
558
+ int64_t getBlockTime (int height) override
559
+ {
560
+ LOCK (::cs_main);
561
+ return Assert (chainman ().ActiveChain ()[height])->GetBlockTime ();
562
+ }
558
563
bool haveBlockOnDisk (int height) override
559
564
{
560
565
LOCK (::cs_main);
You can’t perform that action at this time.
0 commit comments