| 308 | } |
| 309 | |
| 310 | void writeCheckpoint(secp256k1::uint256 nextKey) |
| 311 | { |
| 312 | std::ofstream tmp(_config.checkpointFile, std::ios::out); |
| 313 | |
| 314 | tmp << "start=" << _config.startKey.toString() << std::endl; |
| 315 | tmp << "next=" << nextKey.toString() << std::endl; |
| 316 | tmp << "end=" << _config.endKey.toString() << std::endl; |
| 317 | tmp << "blocks=" << _config.blocks << std::endl; |
| 318 | tmp << "threads=" << _config.threads << std::endl; |
| 319 | tmp << "points=" << _config.pointsPerThread << std::endl; |
| 320 | tmp << "compression=" << getCompressionString(_config.compression) << std::endl; |
| 321 | tmp << "device=" << _config.device << std::endl; |
| 322 | tmp << "elapsed=" << (_config.elapsed + util::getSystemTime() - _startTime) << std::endl; |
| 323 | tmp << "stride=" << _config.stride.toString(); |
| 324 | tmp.close(); |
| 325 | } |
| 326 | |
| 327 | void readCheckpointFile() |
| 328 | { |
no test coverage detected