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

Method GetKeys

src/entities/keystore.h:107–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 return result;
106 }
107 void GetKeys(set<CKeyID> &setAddress, bool bFlag = false) const {
108 setAddress.clear();
109 {
110 LOCK(cs_KeyStore);
111 KeyMap::const_iterator mi = mapKeys.begin();
112 while (mi != mapKeys.end()) {
113 if (!bFlag) // return all address in wallet
114 setAddress.insert((*mi).first);
115 else if (mi->second.HaveMinerKey() ||
116 mi->second.HasMainKey()) // only return satisfied mining address
117 setAddress.insert((*mi).first);
118
119 mi++;
120 }
121 }
122 }
123
124 bool GetKey(const CKeyID &keyid, CKey &keyOut, bool fMiner = false) const {
125 LOCK(cs_KeyStore);

Callers

nothing calls this directly

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