MCPcopy Create free account
hub / github.com/bcndev/bytecoin / load

Method load

src/Core/WalletSerializationV1.cpp:177–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 : m_view_public_key(view_public_key), m_view_secret_key(view_secret_key), m_wallets_container(wallets_container) {}
176
177void WalletSerializerV1::load(const crypto::chacha_key &key, common::IInputStream &source) {
178 seria::BinaryInputStream s(source);
179 s.begin_object();
180
181 uint32_t version = load_version(source);
182
183 if (version > SERIALIZATION_VERSION) {
184 throw std::runtime_error("WRONG_VERSION");
185 } else if (version != 1) {
186 load_wallet(source, key, version);
187 } else {
188 load_wallet_v1(source, key);
189 }
190
191 s.end_object();
192}
193
194void WalletSerializerV1::load_wallet(common::IInputStream &source, const crypto::chacha_key &key, uint32_t version) {
195 CryptoContext crypto_ctx;

Callers

nothing calls this directly

Calls 2

begin_objectMethod · 0.45
end_objectMethod · 0.45

Tested by

no test coverage detected