Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More 32 bit to 64 bit changes #1347

Merged
merged 6 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/app/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ namespace graphene { namespace app {


vector<operation_history_object> history_api::get_relative_account_history( const std::string account_id_or_name,
uint32_t stop,
uint64_t stop,
unsigned limit,
uint32_t start) const
uint64_t start) const
{
FC_ASSERT( _app.chain_database() );
const auto& db = *_app.chain_database();
Expand Down
5 changes: 3 additions & 2 deletions libraries/app/include/graphene/app/api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ namespace graphene { namespace app {
* @return A list of operations performed by account, ordered from most recent to oldest.
*/
vector<operation_history_object> get_relative_account_history( const std::string account_id_or_name,
uint32_t stop = 0,
uint64_t stop = 0,
unsigned limit = 100,
uint32_t start = 0) const;
uint64_t start = 0) const;

/**
* @brief Get details of order executions occurred most recently in a trading pair
* @param a One asset in a trading pair
Expand Down
4 changes: 2 additions & 2 deletions libraries/chain/include/graphene/chain/account_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ namespace graphene { namespace chain {
*/
account_transaction_history_id_type most_recent_op;
/** Total operations related to this account. */
uint32_t total_ops = 0;
uint64_t total_ops = 0;
/** Total operations related to this account that has been removed from the database. */
uint32_t removed_ops = 0;
uint64_t removed_ops = 0;

/**
* When calculating votes it is necessary to know how much is stored in orders (and thus unavailable for
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/include/graphene/chain/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
#define GRAPHENE_RECENTLY_MISSED_COUNT_INCREMENT 4
#define GRAPHENE_RECENTLY_MISSED_COUNT_DECREMENT 3

#define GRAPHENE_CURRENT_DB_VERSION "BTS2.17"
#define GRAPHENE_CURRENT_DB_VERSION "BTS2.18"

#define GRAPHENE_IRREVERSIBLE_THRESHOLD (70 * GRAPHENE_1_PERCENT)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace graphene { namespace chain {
static const uint8_t type_id = impl_account_transaction_history_object_type;
account_id_type account; /// the account this operation applies to
operation_history_id_type operation_id;
uint32_t sequence = 0; /// the operation position within the given account
uint64_t sequence = 0; /// the operation position within the given account
account_transaction_history_id_type next;

//std::pair<account_id_type,operation_history_id_type> account_op()const { return std::tie( account, operation_id ); }
Expand Down Expand Up @@ -121,7 +121,7 @@ namespace graphene { namespace chain {
ordered_unique< tag<by_seq>,
composite_key< account_transaction_history_object,
member< account_transaction_history_object, account_id_type, &account_transaction_history_object::account>,
member< account_transaction_history_object, uint32_t, &account_transaction_history_object::sequence>
member< account_transaction_history_object, uint64_t, &account_transaction_history_object::sequence>
>
>,
ordered_unique< tag<by_op>,
Expand Down
4 changes: 2 additions & 2 deletions libraries/plugins/account_history/account_history_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class account_history_plugin_impl
flat_set<account_id_type> _tracked_accounts;
bool _partial_operations = false;
primary_index< operation_history_index >* _oho_index;
uint32_t _max_ops_per_account = -1;
uint64_t _max_ops_per_account = -1;
private:
/** add one history record, then check and remove the earliest history record */
void add_account_history( const account_id_type account_id, const operation_history_id_type op_id );
Expand Down Expand Up @@ -298,7 +298,7 @@ void account_history_plugin::plugin_initialize(const boost::program_options::var
my->_partial_operations = options["partial-operations"].as<bool>();
}
if (options.count("max-ops-per-account")) {
my->_max_ops_per_account = options["max-ops-per-account"].as<uint32_t>();
my->_max_ops_per_account = options["max-ops-per-account"].as<uint64_t>();
}
}

Expand Down