Fixed bug in get_account_history that prevented all operations from being returned when specific bounds were set.
This commit is contained in:
parent
c89d60ba92
commit
9485ebfd64
1 changed files with 6 additions and 4 deletions
|
|
@ -346,15 +346,17 @@ namespace graphene { namespace app {
|
||||||
if(stats.most_recent_op == account_transaction_history_id_type()) return result;
|
if(stats.most_recent_op == account_transaction_history_id_type()) return result;
|
||||||
const account_transaction_history_object* node = &stats.most_recent_op(db);
|
const account_transaction_history_object* node = &stats.most_recent_op(db);
|
||||||
if(start == operation_history_id_type())
|
if(start == operation_history_id_type())
|
||||||
start = node->id;
|
start = node->operation_id;
|
||||||
|
|
||||||
while(node && node->operation_id.instance.value > stop.instance.value && result.size() < limit)
|
while(node && node->operation_id.instance.value > stop.instance.value && result.size() < limit)
|
||||||
{
|
{
|
||||||
if(node->id.instance() <= start.instance.value)
|
if (node->operation_id.instance.value <= start.instance.value)
|
||||||
result.push_back(node->operation_id(db));
|
result.push_back(node->operation_id(db));
|
||||||
if(node->next == account_transaction_history_id_type())
|
if(node->next == account_transaction_history_id_type())
|
||||||
node = nullptr;
|
node = nullptr;
|
||||||
else node = db.find(node->next);
|
else node = &node->next(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue