MCPcopy Create free account
hub / github.com/LUX-Core/lux / replace

Method replace

src/cpp-ethereum/libethereum/BlockQueue.h:125–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 bool replace(h256 const& _hash, T&& _t)
126 {
127 auto const it = std::find_if(m_queue.begin(), m_queue.end(), sha3UnclesEquals(_hash));
128
129 if (it == m_queue.end())
130 return false;
131
132 m_size -= it->blockData.size();
133 m_size += _t.blockData.size();
134 *it = std::move(_t);
135
136 return true;
137 }
138
139private:
140 static std::function<bool(T const&)> sha3UnclesEquals(h256 const& _hash)

Callers 15

sanitize_stringFunction · 0.80
escape_cdataFunction · 0.80
postprocess_translationsFunction · 0.80
getLastGitModifiedDateFunction · 0.80
ComputeNextModifierMethod · 0.80
qt_create_commandlineFunction · 0.80
verifierBodyMethod · 0.80
fillDifficultyFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
parseTestWithTypesMethod · 0.80
JSONPrettyPrintFunction · 0.80
notifyGrowlMethod · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by 4

fillDifficultyFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
parseTestWithTypesMethod · 0.64
JSONPrettyPrintFunction · 0.64