MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / GetKeys

Method GetKeys

src/wallet/crypter.h:167–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165 bool GetPubKey(const CKeyID& address, CPubKey& vchPubKeyOut, bool IsMiner = false) const;
166
167 void GetKeys(set<CKeyID>& setAddress, bool bFlag = false) const {
168 if (!IsEncrypted()) {
169 CBasicKeyStore::GetKeys(setAddress, bFlag);
170 return;
171 }
172
173 setAddress.clear();
174 CryptedKeyMap::const_iterator mi = mapCryptedKeys.begin();
175 while (mi != mapCryptedKeys.end()) {
176 if (!bFlag)
177 setAddress.insert((*mi).first);
178 else {
179 CKeyCombi keyCombi;
180 if (GetKeyCombi((*mi).first, keyCombi)) {
181 if (keyCombi.HaveMinerKey() || keyCombi.HasMainKey()) // only return satisfied mining address
182 setAddress.insert((*mi).first);
183 }
184 }
185 mi++;
186 }
187 }
188
189 bool GetKeyCombi(const CKeyID& address, CKeyCombi& keyCombiOut) const;
190};

Callers 7

LoadWalletMethod · 0.45
getcontractassetsFunction · 0.45
listaddrFunction · 0.45
listcontractassetsFunction · 0.45
dumpwalletFunction · 0.45
setgenerateFunction · 0.45
ThreadBlockProducingFunction · 0.45

Calls 6

HaveMinerKeyMethod · 0.80
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
HasMainKeyMethod · 0.45

Tested by

no test coverage detected