diff options
author | Carl Dong <contact@carldong.me> | 2021-04-13 17:04:43 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-04-14 11:09:34 -0400 |
commit | 6fb65b49f4d393b091479be5a5df5a0a160cf986 (patch) | |
tree | b2c1ea6f247edf1581b678a2a7201e2549f6f7e1 /src/rest.cpp | |
parent | 1570c7ee98612366df031bebef9e0468fb57b8a2 (diff) | |
download | bitcoin-6fb65b49f4d393b091479be5a5df5a0a160cf986.tar.xz |
scripted-diff: rest/rpc: Use renamed EnsureAny*()
-BEGIN VERIFY SCRIPT-
sed -i -E 's@Ensure([^(]+)(\((request\.|)context\))@EnsureAny\1\2@g' \
-- src/rest.cpp src/rpc/*.cpp
-END VERIFY SCRIPT-
Diffstat (limited to 'src/rest.cpp')
-rw-r--r-- | src/rest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rest.cpp b/src/rest.cpp index 36c7da1e30..dd2d649ff4 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -181,7 +181,7 @@ static bool rest_headers(const std::any& context, headers.reserve(count); { LOCK(cs_main); - ChainstateManager& chainman = EnsureChainman(context); + ChainstateManager& chainman = EnsureAnyChainman(context); tip = chainman.ActiveChain().Tip(); const CBlockIndex* pindex = chainman.m_blockman.LookupBlockIndex(hash); while (pindex != nullptr && chainman.ActiveChain().Contains(pindex)) { @@ -251,7 +251,7 @@ static bool rest_block(const std::any& context, CBlockIndex* tip = nullptr; { LOCK(cs_main); - ChainstateManager& chainman = EnsureChainman(context); + ChainstateManager& chainman = EnsureAnyChainman(context); tip = chainman.ActiveChain().Tip(); pblockindex = chainman.m_blockman.LookupBlockIndex(hash); if (!pblockindex) { @@ -538,7 +538,7 @@ static bool rest_getutxos(const std::any& context, HTTPRequest* req, const std:: std::string bitmapStringRepresentation; std::vector<bool> hits; bitmap.resize((vOutPoints.size() + 7) / 8); - ChainstateManager& chainman = EnsureChainman(context); + ChainstateManager& chainman = EnsureAnyChainman(context); { auto process_utxos = [&vOutPoints, &outs, &hits](const CCoinsView& view, const CTxMemPool& mempool) { for (const COutPoint& vOutPoint : vOutPoints) { @@ -642,7 +642,7 @@ static bool rest_blockhash_by_height(const std::any& context, HTTPRequest* req, CBlockIndex* pblockindex = nullptr; { LOCK(cs_main); - const CChain& active_chain = EnsureChainman(context).ActiveChain(); + const CChain& active_chain = EnsureAnyChainman(context).ActiveChain(); if (blockheight > active_chain.Height()) { return RESTERR(req, HTTP_NOT_FOUND, "Block height out of range"); } |