aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorAntoine Riard <ariard@student.42.fr>2019-04-29 10:18:50 -0400
committerAntoine Riard <ariard@student.42.fr>2019-11-06 13:36:43 -0500
commit36b68de5b2938722911db900ca299f7008780d01 (patch)
tree3791969a005bbd1c2982cb8c2a510a8975cc3b7c /src/interfaces
parentb66c429c56c85fa16c309be0b2bca9c25fdd3e1a (diff)
downloadbitcoin-36b68de5b2938722911db900ca299f7008780d01.tar.xz
Remove getBlockDepth method from Chain::interface
Pass conflicting height in CWallet::MarkConflicted
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/chain.cpp6
-rw-r--r--src/interfaces/chain.h4
2 files changed, 0 insertions, 10 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp
index 0635909cae..26856a00d3 100644
--- a/src/interfaces/chain.cpp
+++ b/src/interfaces/chain.cpp
@@ -58,12 +58,6 @@ class LockImpl : public Chain::Lock, public UniqueLock<CCriticalSection>
}
return nullopt;
}
- int getBlockDepth(const uint256& hash) override
- {
- const Optional<int> tip_height = getHeight();
- const Optional<int> height = getBlockHeight(hash);
- return tip_height && height ? *tip_height - *height + 1 : 0;
- }
uint256 getBlockHash(int height) override
{
LockAssertion lock(::cs_main);
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h
index e07ec1b371..349af152d5 100644
--- a/src/interfaces/chain.h
+++ b/src/interfaces/chain.h
@@ -76,10 +76,6 @@ public:
//! included in the current chain.
virtual Optional<int> getBlockHeight(const uint256& hash) = 0;
- //! Get block depth. Returns 1 for chain tip, 2 for preceding block, and
- //! so on. Returns 0 for a block not included in the current chain.
- virtual int getBlockDepth(const uint256& hash) = 0;
-
//! Get block hash. Height must be valid or this function will abort.
virtual uint256 getBlockHash(int height) = 0;