| 110 | // class CBlockUndoExecutor |
| 111 | |
| 112 | bool CBlockUndoExecutor::Execute() { |
| 113 | // undoFuncMap |
| 114 | // RegisterUndoFunc(); |
| 115 | const UndoDataFuncMap &undoDataFuncMap = cw.GetUndoDataFuncMap(); |
| 116 | |
| 117 | for (auto it = block_undo.vtxundo.rbegin(); it != block_undo.vtxundo.rend(); it++) { |
| 118 | for (const auto &opLogPair : it->dbOpLogMap.GetMap()) { |
| 119 | dbk::PrefixType prefixType = dbk::ParseKeyPrefixType(opLogPair.first); |
| 120 | if (prefixType == dbk::EMPTY) |
| 121 | return ERRORMSG("%s(), unkown prefix! prefix_type=%s", __FUNCTION__, |
| 122 | opLogPair.first); |
| 123 | auto funcMapIt = undoDataFuncMap.find(prefixType); |
| 124 | if (funcMapIt == undoDataFuncMap.end()) { |
| 125 | return ERRORMSG("%s(), unfound prefix in db! prefix_type=%s", __FUNCTION__, |
| 126 | opLogPair.first); |
| 127 | } |
| 128 | funcMapIt->second(opLogPair.second); |
| 129 | } |
| 130 | } |
| 131 | return true; |
| 132 | } |
nothing calls this directly
no test coverage detected