update for beem: compatibility issues with HF24 have been fixed

@holger80 · 2020-10-09 21:50 · hive-139531

Repository

https://github.com/holgern/beem

beem-logo

beem is a python library and command line tool for HIVE. The current version is 0.24.10.

There is also a discord channel for beem: https://discord.gg/4HM592V

The newest beem version can be installed by:

pip install -U beem

Check that you are using hive nodes. The following command

beempy updatenodes --hive

updates the nodelist and uses only hive nodes. After setting hive as default_chain, beempy updatenodes can be used.

The list of nodes can be checked with

beempy config

and

beempy currentnode

shows the currently connected node.

Changelog for versions 0.24.10

  • Add hbd_interest_rate to beempy witnessproperties
  • Add beempy listdelegations (thanks to @crokkon)
  • fix account_name assignment from dict in get_account_reputations() (PR #259)
  • Add new operation ids for HF 24
  • Remove remaining py2 code
  • Run unit tests on beta.openhive.network
  • Fix compatibility issues with HF 24
  • account get_follow_count, get_followers and get_following have been fixed
  • improved get_discussions calls, fallback to condenser when tags api not available
  • Fix detection when content does not exist on HF24
  • Fix detection when a vote does not exist on HF24

Running all unit tests on beta.openhive.network

I modified the unit tests so that they all run on the HF24 test node: https://beta.openhive.network. After several iterations, all 551 unit tests run through.

beem should now be ready for HF 24.

unit tests on HF24

Detecting not existing comment and votes

The behavior for not existing comment/posts and votes have been changed. A condenser call returns now an error message with invalid parameter:

{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid parameters","data":"post was not found in cache"},"id":1}

I added a new InvalidParameter exception to beemapi.exceptions in order to handle this.

Fallback to condenser calls when tag api is not available

When the tag api is not available, beem is now switching to the condenser api call in all get_discusions functions.

Fallback to condenser call when follow api is not available

When the follow api is not available, beem is switching to the condenser api call in get_follow_count, get_followers and get_following for an account.

Receiving all votes for an account has been fixed

On HF24, the list_votes api call does not return votes from other users, when all votes of an account have been received. It stops now and less votes than expected will be returned instead.

I fixed it by counting how many votes the api call returns, when the number of returned votes is below the set limit, I have all votes collected.


If you like what I do, consider casting a vote for me as witness on Hivesigner or on PeakD

#development #python #beem #hf24 ##259
Payout: 0.000 HBD
Votes: 460
More interactions (upvote, reblog, reply) coming soon.