| 84 | } |
| 85 | |
| 86 | bool readblock(const string &filePath) |
| 87 | { |
| 88 | CBlock block; |
| 89 | FILE* fp = fopen(filePath.c_str(), "rb"); |
| 90 | if (!fp) return false; |
| 91 | |
| 92 | fseek(fp, 8, SEEK_SET); // skip msgheader/size |
| 93 | |
| 94 | CAutoFile filein = CAutoFile(fp, SER_DISK, CLIENT_VERSION); |
| 95 | if (!filein) return false; |
| 96 | while(!feof(fp)) { |
| 97 | filein >> block; |
| 98 | CDataStream ds(SER_DISK, CLIENT_VERSION); |
| 99 | ds << block; |
| 100 | vector<string> param; |
| 101 | param.push_back(HexStr(ds)); |
| 102 | SubmitBlock(param); |
| 103 | } |
| 104 | return true; |
| 105 | } |
| 106 | |
| 107 | class CMiningTest { |
| 108 | public: |
nothing calls this directly
no test coverage detected