[api tests][pyresttest][payout] test follow_api get_blog fail
- on directory tests create 'build' folder
- cd tests/build
- cmake -DTEST_NODE=<address_of_your_hivemind> .. (example: cmake -DTEST_NODE=http://127.0.0.1:8080 ..)
- uncommet test in file: tests_api/hivemind/pyrest_tests/5000000/follow_api/follow_api_test.yaml :
# - test:
# - name: "get_blog"
# - variable_binds:
# - method: "get_blog"
# - args: '{"account":"steemit","start_entry_id":0,"limit":1}'
# - <<: *base_test
- run in console ctest -R api/pyresttests/5000000/follow_api 'ctest -R api/pyresttests/5000000/condenser_api --output-on-failure'
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Marcin changed the description
changed the description
- Marcin assigned to @Ickiewicz
assigned to @Ickiewicz
- Author Developer
follow.api.get_blog == condenser_api.get_blog The first problem is, that to a verbose description of votes is returned, that because of function 'load_posts' from file hivemind/build/lib/hive/server/condenser_api/objects.py. Each vote should consist only percent,reputation,rshares,voter. The same problem is for the apis:
condenser_api.get_state condenser_api.get_discussions_by_trending condenser_api.get_discussions_by_hot condenser_api.get_discussions_by_promoted condenser_api.get_discussions_by_created condenser_api.get_discussions_by_blog condenser_api.get_discussions_by_feed condenser_api.get_replies_by_last_update condenser_api.get_discussions_by_author_before_date condenser_api.get_post_discussions_by_payout condenser_api.get_comment_discussions_by_payout condenser_api.get_blog
All the api call above use mentioned 'load_posts" function, and it is expected that all of them will return the same format of votes description.
- Author Developer
The problem of votes descriptions is solved here: !48 (merged)
Edited by Marcin - Author Developer
Next problem is incorrect rshare and percent for some user's vote, expected:
{ "percent": "1509", "reputation": 0, "rshares": "1746058458", "voter": "murh" }
returned:
{ "percent": "10000", "reputation": 0, "rshares": "4177775313", "voter": "murh" }
The vote was registered in a block 3623002 HF12
"murh" has voted more than once for the post:
query for 0.23.0 node: {"jsonrpc":"2.0", "method":"database_api.list_votes", "params":{"start": ["steemit", "firstpost", "murh" ], "limit": 1000, "order": "by_comment_voter" }, "id":1}
returns:
{ "id": 1450425, "voter": "murh", "author": "steemit", "permlink": "firstpost", "weight": 0, "rshares": 1746058458, "vote_percent": 1509, "last_update": "2016-09-12T23:22:15", "num_changes": 2 }
Last upvote registered in block 4918385 HF13
Hived return vop for the voting transaction:
"op":{"type":"effective_comment_vote_operation","value":{"voter":"murh","author":"steemit","permlink":"firstpost","weight":0,"rshares":0,"vote_percent":1509,"pending_payout":{"amount":"0","precision":3,"nai":"@@000000013"}}},"operation_id":"9223372036871519727"}]}
Edited by Marcin - Author Developer
Problem with 'murh' revote percentage was cuased by incorrect sql query, fix:
diff --git a/hive/indexer/votes.py b/hive/indexer/votes.py index 6451a1e..1ad248a 100644 --- a/hive/indexer/votes.py +++ b/hive/indexer/votes.py @@ -106,7 +106,7 @@ class Votes: vote_percent = EXCLUDED.vote_percent, last_update = EXCLUDED.last_update, num_changes = hive_votes.num_changes + 1 - WHERE hive_votes.id = EXCLUDED.id + WHERE hive_votes.post_id = EXCLUDED.post_id """
But still, there are problems with updating rshares->vop returned by hived has set it to 0
Edited by Marcin - Author Developer
Problem with 'murh' revote percentage was cuased by incorrect sql query, fix:
diff --git a/hive/indexer/votes.py b/hive/indexer/votes.py index 6451a1e..1ad248a 100644 --- a/hive/indexer/votes.py +++ b/hive/indexer/votes.py @@ -106,7 +106,7 @@ class Votes: vote_percent = EXCLUDED.vote_percent, last_update = EXCLUDED.last_update, num_changes = hive_votes.num_changes + 1 - WHERE hive_votes.id = EXCLUDED.id + WHERE hive_votes.post_id = EXCLUDED.post_id """
But still there are problems with updating rshares->vop returned by hivemind has set it to 0
- Author Developer
The Problem with 'murh' vote rshare is fixed on MR: !44 (closed) and hive!91 (merged) where payouts are corrected and some changes with effective_vote_processing are made
Edited by Marcin - Marcin changed title from [api tests][pyresttest] test follow_api get_blog fail to [api tests][pyresttest][payout] test follow_api get_blog fail
changed title from [api tests][pyresttest] test follow_api get_blog fail to [api tests][pyresttest][payout] test follow_api get_blog fail
- Author Developer
I made it 'blocked' because is waiting for merge !44 (closed) and hive!91 (merged)
Edited by Marcin - Author Developer
The test passes on ac30d805
- Marcin closed
closed