MCPcopy Create free account
hub / github.com/Clarionos/clarion / GetCompact

Method GetCompact

libraries/fc/src/crypto/base58.cpp:241–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239 }
240
241 unsigned int GetCompact() const
242 {
243 unsigned int nSize = BN_bn2mpi(bn, NULL);
244 std::vector<unsigned char> vch(nSize);
245 nSize -= 4;
246 BN_bn2mpi(bn, &vch[0]);
247 unsigned int nCompact = nSize << 24;
248 if (nSize >= 1) nCompact |= (vch[4] << 16);
249 if (nSize >= 2) nCompact |= (vch[5] << 8);
250 if (nSize >= 3) nCompact |= (vch[6] << 0);
251 return nCompact;
252 }
253
254 void SetHex(const std::string& str)
255 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected