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

Method resetHashFunc

tools/parser/parser_configuration.cpp:55–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53ParserConfiguration<FileTag>::ParserConfiguration(const blocksci::DataConfiguration &dataConfig, const ChainDiskConfiguration &diskConfig) : ParserConfigurationBase(dataConfig), diskConfig(diskConfig) {}
54
55void ChainDiskConfiguration::resetHashFunc() {
56 if (hashFuncName == "doubleSha256") {
57 workHashFunction = doubleSha256;
58 } else {
59 throw std::runtime_error("Unsupported hash func type");
60 }
61}
62
63void to_json(json& j, const ChainDiskConfiguration& p) {
64 j = json{{"blockMagic", p.blockMagic}, {"hashFuncName", p.hashFuncName}, {"coinDirectory", p.coinDirectory.str()}};

Callers 1

from_jsonFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected