Skip to content

Commit

Permalink
Fix changelog and unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
holgern committed Apr 18, 2020
1 parent ac35ddf commit ee7e49f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ Changelog
0.23.0
------
* set hive as default for default_chain
* get_nodes return hive nodes by default
* get_steem_nodes added to NodeList
* Prepared for Hive HF 24
* steem object in all classes is replaced by blockchain
* Hive class has been added
* Hive and Steem are now BlockChainInstance classes
* Hive and Steem have now is_hive and is_steem properties
* Each class has now blockchain_instance parameter (steem_instance is stil available)
* shared_blockchain_instance and set_shared_blockchain_instance can be used for Hive() and Steem() instances
* token_symbol, backed_token_symbol and vest_token_symbol
* Rename SteemWebsocket to NodeWebsocket and SteemNodeRPC to NodeRPC
* Rshares, vote percentage and SBD/HBD calculation has been fixed for votes
* post_rshares parameter added to all vote calculations
* Account class has now get_token_power(), get_voting_value() and get_vote_pct_for_vote_value()

0.22.14
-------
Expand Down
2 changes: 2 additions & 0 deletions examples/print_comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
import io
from beem.blockchain import Blockchain
from beem.instance import shared_blockchain_instance
from beem.utils import parse_time
import logging
log = logging.getLogger(__name__)
Expand All @@ -22,5 +23,6 @@ def comment(self, comment_event):
if __name__ == "__main__":
tb = DemoBot()
blockchain = Blockchain()
print("Starting on %s network" % shared_blockchain_instance().get_blockchain_name())
for vote in blockchain.stream(opNames=["comment"]):
tb.comment(vote)
2 changes: 2 additions & 0 deletions examples/print_votes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
import io
from beem.blockchain import Blockchain
from beem.instance import shared_blockchain_instance
from beem.utils import parse_time
import logging
log = logging.getLogger(__name__)
Expand All @@ -25,5 +26,6 @@ def vote(self, vote_event):
if __name__ == "__main__":
tb = DemoBot()
blockchain = Blockchain()
print("Starting on %s network" % shared_blockchain_instance().get_blockchain_name())
for vote in blockchain.stream(opNames=["vote"]):
tb.vote(vote)
6 changes: 3 additions & 3 deletions tests/beem/test_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class Testcases(unittest.TestCase):
@classmethod
def setUpClass(cls):
nodelist = NodeList()
nodelist.update_nodes(steem_instance=Steem(node=nodelist.get_nodes(hive=True), num_retries=10))
node_list = nodelist.get_nodes(hive=True)
nodelist.update_nodes(steem_instance=Steem(node=nodelist.get_hive_nodes(), num_retries=10))
node_list = nodelist.get_hive_nodes()

cls.bts = Steem(
node=node_list,
Expand All @@ -34,7 +34,7 @@ def setUpClass(cls):
)

acc = Account("fullnodeupdate", steem_instance=cls.bts)
comment = Comment(acc.get_blog_entries(limit=5)[-1], steem_instance=cls.bts)
comment = Comment(acc.get_blog_entries(limit=5)[0], steem_instance=cls.bts)
cls.authorperm = comment.authorperm
[author, permlink] = resolve_authorperm(cls.authorperm)
cls.author = author
Expand Down

0 comments on commit ee7e49f

Please sign in to comment.