aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/asset_db.h
blob: 0df5721e0e4f38d6458ebab5921642a1c45bc8c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

#include <string>
#include <vector>

#include "blockchain_db.h"
#include "cryptonote_basic/asset_types.h"

namespace cryptonote
{
namespace assets
{
  bool load_registry_from_db(
    const BlockchainDB& db,
    network_type expected_network,
    asset_registry& registry,
    std::string* error = nullptr);

  // The caller must hold the blockchain write transaction. Semantic
  // validation finishes before the first database write, and any exception
  // raised by storage must cause that outer transaction to be aborted.
  bool apply_block_extensions_to_db(
    BlockchainDB& db,
    const std::vector<transaction_extension>& extensions,
    const std::vector<crypto::hash>& carrier_prefix_hashes,
    network_type expected_network,
    uint64_t height,
    std::vector<crypto::hash>& asset_ids,
    std::string* error = nullptr);
}
}