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. */
| 121 | * For hashes it's just the first 4 bytes of the hash. For pubkeys, it's the last 4 bytes. |
| 122 | */ |
| 123 | uint32_t ChallengeNumber(const CPubKey& pubkey) { return ReadLE32(pubkey.data() + 29); } |
| 124 | uint32_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. |
no test coverage detected