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