MCPcopy Create free account
hub / github.com/ElementsProject/elements / Read

Method Read

src/wallet/db.h:44–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43 template <typename K, typename T>
44 bool Read(const K& key, T& value)
45 {
46 CDataStream ssKey(SER_DISK, CLIENT_VERSION);
47 ssKey.reserve(1000);
48 ssKey << key;
49
50 CDataStream ssValue(SER_DISK, CLIENT_VERSION);
51 if (!ReadKey(std::move(ssKey), ssValue)) return false;
52 try {
53 ssValue >> value;
54 return true;
55 } catch (const std::exception&) {
56 return false;
57 }
58 }
59
60 template <typename K, typename T>
61 bool Write(const K& key, const T& value, bool fOverwrite = true)

Callers 5

WriteCryptedKeyMethod · 0.45
ReadBestBlockMethod · 0.45
ReadPoolMethod · 0.45
LoadWalletMethod · 0.45
FindWalletTxMethod · 0.45

Calls 1

reserveMethod · 0.45

Tested by

no test coverage detected