| 135 | } |
| 136 | |
| 137 | bool CDexDBCache::GetDexOperatorByOwner(const CRegID ®id, DexID &idOut, DexOperatorDetail& detail) { |
| 138 | decltype(operator_owner_map_cache)::ValueType dexID; |
| 139 | if (operator_owner_map_cache.GetData(regid, dexID)) { |
| 140 | idOut = dexID.value().get(); |
| 141 | return GetDexOperator(dexID.value().get(), detail); |
| 142 | }else { |
| 143 | CRegID sysRegId = SysCfg().GetDex0OwnerRegId(); |
| 144 | if (sysRegId == regid) { |
| 145 | idOut = MAIN_DEX_ID; |
| 146 | bool result = GetDexOperator(idOut ,detail); |
| 147 | if (result && detail.owner_regid == regid) |
| 148 | return result; |
| 149 | } |
| 150 | } |
| 151 | return false; |
| 152 | } |
| 153 | |
| 154 | bool CDexDBCache::HaveDexOperator(const DexID &id) { |
| 155 | if (id == MAIN_DEX_ID ) |
no test coverage detected