fetching up to 200 items
This commit is contained in:
parent
a4d4ab0108
commit
3273d1f7b6
1 changed files with 2 additions and 2 deletions
|
|
@ -371,7 +371,7 @@ namespace graphene { namespace app {
|
||||||
FC_ASSERT(_app.chain_database());
|
FC_ASSERT(_app.chain_database());
|
||||||
const auto& db = *_app.chain_database();
|
const auto& db = *_app.chain_database();
|
||||||
vector<bucket_object> result;
|
vector<bucket_object> result;
|
||||||
result.reserve(100);
|
result.reserve(200);
|
||||||
|
|
||||||
if( a > b ) std::swap(a,b);
|
if( a > b ) std::swap(a,b);
|
||||||
|
|
||||||
|
|
@ -379,7 +379,7 @@ namespace graphene { namespace app {
|
||||||
const auto& by_key_idx = bidx.indices().get<by_key>();
|
const auto& by_key_idx = bidx.indices().get<by_key>();
|
||||||
|
|
||||||
auto itr = by_key_idx.lower_bound( bucket_key( a, b, bucket_seconds, start ) );
|
auto itr = by_key_idx.lower_bound( bucket_key( a, b, bucket_seconds, start ) );
|
||||||
while( itr != by_key_idx.end() && itr->key.open <= end && result.size() < 100 )
|
while( itr != by_key_idx.end() && itr->key.open <= end && result.size() < 200 )
|
||||||
{
|
{
|
||||||
if( !(itr->key.base == a && itr->key.quote == b && itr->key.seconds == bucket_seconds) )
|
if( !(itr->key.base == a && itr->key.quote == b && itr->key.seconds == bucket_seconds) )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue