MCPcopy Create free account
hub / github.com/citp/BlockSci / hexStringToVec

Function hexStringToVec

tools/parser/preproccessed_block.cpp:32–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31template <typename CharType>
32std::vector<CharType> hexStringToVec(const std::string &scripthex) {
33 std::vector<CharType> scriptBytes;
34 for (unsigned int i = 0; i < scripthex.size(); i += 2) {
35 std::string byteString = scripthex.substr(i, 2);
36 auto byte = static_cast<CharType>(strtol(byteString.c_str(), nullptr, 16));
37 scriptBytes.push_back(byte);
38 }
39 return scriptBytes;
40}
41
42#ifdef BLOCKSCI_FILE_PARSER
43RawInput::RawInput(SafeMemReader &reader) : utxo{} {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected