aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/chain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/chain.cpp')
-rw-r--r--src/interfaces/chain.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp
index 138d1bfd5f..ca2533bb1d 100644
--- a/src/interfaces/chain.cpp
+++ b/src/interfaces/chain.cpp
@@ -46,6 +46,18 @@ class LockImpl : public Chain::Lock
assert(block != nullptr);
return block->GetBlockHash();
}
+ int64_t getBlockTime(int height) override
+ {
+ CBlockIndex* block = ::chainActive[height];
+ assert(block != nullptr);
+ return block->GetBlockTime();
+ }
+ int64_t getBlockMedianTimePast(int height) override
+ {
+ CBlockIndex* block = ::chainActive[height];
+ assert(block != nullptr);
+ return block->GetMedianTimePast();
+ }
};
class LockingStateImpl : public LockImpl, public UniqueLock<CCriticalSection>