placeholder checkin because of so many changes having been made - let's use github as a backup site
This commit is contained in:
@@ -157,13 +157,18 @@ struct txpool_tx_meta_t
|
||||
{
|
||||
crypto::hash max_used_block_id;
|
||||
crypto::hash last_failed_id;
|
||||
crypto::public_key destination_address;
|
||||
uint64_t weight;
|
||||
uint64_t fee;
|
||||
uint64_t amount_burnt;
|
||||
uint64_t amount_slippage_limit;
|
||||
uint64_t max_used_block_height;
|
||||
uint64_t last_failed_height;
|
||||
uint64_t receive_time;
|
||||
uint64_t last_relayed_time; //!< If received over i2p/tor, randomized forward time. If Dandelion++stem, randomized embargo time. Otherwise, last relayed timestamp
|
||||
// 112 bytes
|
||||
uint32_t source_asset_id;
|
||||
uint32_t destination_asset_id;
|
||||
// 168 bytes
|
||||
uint8_t kept_by_block;
|
||||
uint8_t relayed;
|
||||
uint8_t do_not_relay;
|
||||
@@ -174,7 +179,7 @@ struct txpool_tx_meta_t
|
||||
uint8_t is_forwarding: 1;
|
||||
uint8_t bf_padding: 3;
|
||||
|
||||
uint8_t padding[76]; // till 192 bytes
|
||||
uint8_t padding[20]; // till 192 bytes
|
||||
|
||||
void set_relay_method(relay_method method) noexcept;
|
||||
relay_method get_relay_method() const noexcept;
|
||||
@@ -1170,7 +1175,7 @@ public:
|
||||
*
|
||||
* @return the current circulating supply tally values
|
||||
*/
|
||||
virtual std::vector<std::pair<std::string, std::string>> get_circulating_supply() const = 0;
|
||||
virtual std::map<std::string, uint64_t> get_circulating_supply() const = 0;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1055,7 +1055,8 @@ uint64_t BlockchainLMDB::add_transaction_data(const crypto::hash& blk_hash, cons
|
||||
cs.source_currency_type = std::find(oracle::ASSET_TYPES.begin(), oracle::ASSET_TYPES.end(), strSource) - oracle::ASSET_TYPES.begin();
|
||||
cs.dest_currency_type = std::find(oracle::ASSET_TYPES.begin(), oracle::ASSET_TYPES.end(), strDest) - oracle::ASSET_TYPES.begin();
|
||||
cs.amount_burnt = tx.amount_burnt;
|
||||
cs.amount_minted = tx.amount_minted;
|
||||
// SRCG - need to work out how to populate this
|
||||
//cs.amount_minted = tx.amount_minted;
|
||||
|
||||
MDB_val_set(val_circ_supply, cs);
|
||||
result = mdb_cursor_put(m_cur_circ_supply, &val_tx_id, &val_circ_supply, MDB_APPEND);
|
||||
@@ -1164,7 +1165,8 @@ void BlockchainLMDB::remove_transaction_data(const crypto::hash& tx_hash, const
|
||||
cs.tx_hash = tx_hash;
|
||||
//cs.pricing_record_height = tx.pricing_record_height;
|
||||
cs.amount_burnt = tx.amount_burnt;
|
||||
cs.amount_minted = tx.amount_minted;
|
||||
// SRCG - need to work out how to populate this
|
||||
//cs.amount_minted = tx.amount_minted;
|
||||
cs.source_currency_type = std::find(oracle::ASSET_TYPES.begin(), oracle::ASSET_TYPES.end(), strSource) - oracle::ASSET_TYPES.begin();
|
||||
cs.dest_currency_type = std::find(oracle::ASSET_TYPES.begin(), oracle::ASSET_TYPES.end(), strDest) - oracle::ASSET_TYPES.begin();
|
||||
|
||||
@@ -3183,10 +3185,10 @@ uint64_t BlockchainLMDB::height() const
|
||||
return db_stats.ms_entries;
|
||||
}
|
||||
|
||||
std::vector<std::pair<std::string, std::string>> BlockchainLMDB::get_circulating_supply() const
|
||||
std::map<std::string,uint64_t> BlockchainLMDB::get_circulating_supply() const
|
||||
{
|
||||
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
|
||||
std::vector<std::pair<std::string, std::string>> circulating_supply;
|
||||
std::map<std::string, uint64_t> circulating_supply;
|
||||
uint64_t m_height = height();
|
||||
if (m_height == 0) {
|
||||
return circulating_supply;
|
||||
@@ -3225,14 +3227,14 @@ std::vector<std::pair<std::string, std::string>> BlockchainLMDB::get_circulating
|
||||
amount += m_coinbase;
|
||||
}
|
||||
|
||||
circulating_supply.emplace_back(std::pair<std::string, std::string>{currency_label, amount.str()});
|
||||
circulating_supply[currency_label] = amount.convert_to<uint64_t>();
|
||||
}
|
||||
|
||||
TXN_POSTFIX_RDONLY();
|
||||
|
||||
// NEAC: check for empty supply tally - only happens prior to first conversion on chain
|
||||
if (circulating_supply.empty()) {
|
||||
circulating_supply.emplace_back(std::pair<std::string, std::string>{"FULM", std::to_string(m_coinbase)});
|
||||
circulating_supply["FULM"] = m_coinbase;
|
||||
}
|
||||
return circulating_supply;
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
|
||||
virtual uint64_t height() const;
|
||||
|
||||
virtual std::vector<std::pair<std::string, std::string>> get_circulating_supply() const;
|
||||
virtual std::map<std::string, uint64_t> get_circulating_supply() const;
|
||||
|
||||
virtual bool tx_exists(const crypto::hash& h) const;
|
||||
virtual bool tx_exists(const crypto::hash& h, uint64_t& tx_index) const;
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
virtual void drop_alt_blocks() override {}
|
||||
virtual bool for_all_alt_blocks(std::function<bool(const crypto::hash &blkid, const alt_block_data_t &data, const cryptonote::blobdata_ref *blob)> f, bool include_blob = false) const override { return true; }
|
||||
|
||||
virtual std::vector<std::pair<std::string, std::string>> get_circulating_supply() const override { return std::vector<std::pair<std::string, std::string>>(); }
|
||||
virtual std::map<std::string, uint64_t> get_circulating_supply() const override { return std::map<std::string, uint64_t>(); }
|
||||
virtual void get_output_id_from_asset_type_output_index(const std::string asset_type, const std::vector<uint64_t> &asset_type_output_indices, std::vector<uint64_t> &output_indices) const override { }
|
||||
virtual uint64_t get_output_id_from_asset_type_output_index(const std::string asset_type, const uint64_t &asset_type_output_index) const override { return 0; };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user