Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
5e922bc3
Commit
5e922bc3
authored
4 years ago
by
Dariusz Kędzierski
Browse files
Options
Downloads
Patches
Plain Diff
Fix for getting vops timeout. Vops are read in 100 blocks chunks and then joined.
parent
dc255c15
No related branches found
No related tags found
5 merge requests
!456
Release candidate v1 24
,
!230
Setup monitoring with pghero
,
!135
Enable postgres monitoring on CI server
,
!16
Dk issue 3 concurrent block query rebase
,
!15
Dk issue 3 concurrent block query
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hive/steem/client.py
+19
-9
19 additions, 9 deletions
hive/steem/client.py
with
19 additions
and
9 deletions
hive/steem/client.py
+
19
−
9
View file @
5e922bc3
...
...
@@ -155,16 +155,26 @@ class SteemClient:
def
enum_virtual_ops
(
self
,
begin_block
,
end_block
):
"""
Get virtual ops for range of blocks
"""
result
=
self
.
__exec
(
'
enum_virtual_ops
'
,
{
"
block_range_begin
"
:
begin_block
,
"
block_range_end
"
:
end_block
})
ops
=
result
[
'
ops
'
]
if
'
ops
'
in
result
else
[]
tracked_ops
=
[
'
curation_reward_operation
'
,
'
author_reward_operation
'
,
'
comment_reward_operation
'
,
'
effective_comment_vote_operation
'
]
ret
=
{}
for
op
in
ops
:
block
=
op
[
'
block
'
]
if
block
in
ret
and
op
[
'
op
'
][
'
type
'
]
in
tracked_ops
:
ret
[
block
][
'
ops
'
].
append
(
op
[
'
op
'
])
if
block
not
in
ret
and
op
[
'
op
'
][
'
type
'
]
in
tracked_ops
:
ret
[
block
]
=
{
'
timestamp
'
:
op
[
'
timestamp
'
],
'
ops
'
:[
op
[
'
op
'
]]}
delta
=
100
from_block
=
begin_block
to_block
=
(
begin_block
+
delta
)
if
begin_block
+
delta
<
end_block
else
end_block
while
from_block
<
to_block
:
print
(
"
From:
"
,
from_block
,
"
To:
"
,
to_block
)
result
=
self
.
__exec
(
'
enum_virtual_ops
'
,
{
"
block_range_begin
"
:
from_block
,
"
block_range_end
"
:
to_block
})
ops
=
result
[
'
ops
'
]
if
'
ops
'
in
result
else
[]
tracked_ops
=
[
'
curation_reward_operation
'
,
'
author_reward_operation
'
,
'
comment_reward_operation
'
,
'
effective_comment_vote_operation
'
]
for
op
in
ops
:
block
=
op
[
'
block
'
]
if
block
in
ret
and
op
[
'
op
'
][
'
type
'
]
in
tracked_ops
:
ret
[
block
][
'
ops
'
].
append
(
op
[
'
op
'
])
if
block
not
in
ret
and
op
[
'
op
'
][
'
type
'
]
in
tracked_ops
:
ret
[
block
]
=
{
'
timestamp
'
:
op
[
'
timestamp
'
],
'
ops
'
:[
op
[
'
op
'
]]}
from_block
=
to_block
to_block
=
(
from_block
+
delta
)
if
from_block
+
delta
<
end_block
else
end_block
return
ret
def
get_comment_pending_payouts
(
self
,
comments
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment