MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ChallengeNumber

Function ChallengeNumber

src/test/miniscript_tests.cpp:123–123  ·  view source on GitHub ↗

With each leaf condition we associate a challenge number. * For hashes it's just the first 4 bytes of the hash. For pubkeys, it's the last 4 bytes. */

Source from the content-addressed store, hash-verified

121 * For hashes it's just the first 4 bytes of the hash. For pubkeys, it's the last 4 bytes.
122 */
123uint32_t ChallengeNumber(const CPubKey& pubkey) { return ReadLE32(pubkey.data() + 29); }
124uint32_t ChallengeNumber(const std::vector<unsigned char>& hash) { return ReadLE32(hash.data()); }
125
126//! A Challenge is a combination of type of leaf condition and its challenge number.

Callers 3

SignMethod · 0.85
SatHashMethod · 0.85
FindChallengesFunction · 0.85

Calls 2

ReadLE32Function · 0.85
dataMethod · 0.45

Tested by

no test coverage detected