Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
hive
hive
Commits
449a3ac0
Commit
449a3ac0
authored
Jul 20, 2020
by
Marcin
Committed by
Bartek Wrona
Jul 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enumVirtualOperations: now next operation really points to next op
parent
53003549
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
libraries/plugins/account_history_rocksdb/account_history_rocksdb_plugin.cpp
...ccount_history_rocksdb/account_history_rocksdb_plugin.cpp
+12
-13
No files found.
libraries/plugins/account_history_rocksdb/account_history_rocksdb_plugin.cpp
View file @
449a3ac0
...
...
@@ -1089,7 +1089,7 @@ std::pair< uint32_t, uint64_t > account_history_rocksdb_plugin::impl::enumVirtua
uint32_t
lastFoundBlock
=
0
;
uint32_t
cntLimit
=
0
;
bool
limitExceeded
=
false
;
fc
::
optional
<
uint64_t
>
nextElementAfterLimit
;
for
(
it
->
Seek
(
rangeBeginSlice
);
it
->
Valid
();
it
->
Next
())
{
...
...
@@ -1106,27 +1106,26 @@ std::pair< uint32_t, uint64_t > account_history_rocksdb_plugin::impl::enumVirtua
bool
found
=
find_operation_object
(
opId
,
&
op
);
FC_ASSERT
(
found
);
///Number of retrieved operations can't be greater then limit
if
(
limit
.
valid
()
&&
(
cntLimit
>=
*
limit
))
{
nextElementAfterLimit
=
key
.
second
;
break
;
}
if
(
processor
(
op
,
key
.
second
))
{
{
++
cntLimit
;
lastProcessedOperationId
=
key
.
second
;
///Number of retrieved operations can't be greater then limit
if
(
limit
.
valid
()
&&
(
cntLimit
>=
*
limit
))
{
limitExceeded
=
true
;
break
;
}
}
}
lastFoundBlock
=
key
.
first
;
}
}
if
(
limitExceeded
)
if
(
nextElementAfterLimit
.
valid
()
)
{
return
std
::
make_pair
(
lastFoundBlock
,
lastProcessedOperationId
);
return
std
::
make_pair
(
lastFoundBlock
,
*
nextElementAfterLimit
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment