diff options
author | Carl Dong <contact@carldong.me> | 2020-08-25 17:39:57 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-01-28 14:15:26 -0500 |
commit | eae54e6e60d7ed05b29d8345c0bb055397149ce8 (patch) | |
tree | ca337597b1656e3a68bb585d70eacd8868bdcd50 /src/init.cpp | |
parent | 15d20f40e1321b24963b40c12958c7d30ad112ec (diff) | |
download | bitcoin-eae54e6e60d7ed05b29d8345c0bb055397149ce8.tar.xz |
scripted-diff: Use BlockManager::LookupBlockIndex
[META] In a previous commit, we moved ::LookupBlockIndex to become a
member function of BlockManager. This commit is split out from
that one since it can be expressed nicely as a scripted-diff.
-BEGIN VERIFY SCRIPT-
find_regex='LookupBlockIndex' \
&& git grep -l -E "$find_regex" -- src \
| grep -v '^src/validation\.\(cpp\|h\)$' \
| xargs sed -i -E "s@${find_regex}@g_chainman.m_blockman.LookupBlockIndex@g"
-END VERIFY SCRIPT-
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 8e37300c99..cf6fad9982 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1611,7 +1611,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA // If the loaded chain has a wrong genesis, bail out immediately // (we're likely using a testnet datadir, or the other way around). if (!chainman.BlockIndex().empty() && - !LookupBlockIndex(chainparams.GetConsensus().hashGenesisBlock)) { + !g_chainman.m_blockman.LookupBlockIndex(chainparams.GetConsensus().hashGenesisBlock)) { return InitError(_("Incorrect or no genesis block found. Wrong datadir for network?")); } |