Skip to content
Snippets Groups Projects
Commit ee7e49fb authored by Holger's avatar Holger
Browse files

Fix changelog and unit test

parent ac35ddf3
No related branches found
No related tags found
2 merge requests!5Taken current version of master branch in the https://github.com/holgern/beem,!4Original changes pushed to master at https://github.com/holgern/beem
...@@ -3,15 +3,19 @@ Changelog ...@@ -3,15 +3,19 @@ Changelog
0.23.0 0.23.0
------ ------
* set hive as default for default_chain * 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 * Prepared for Hive HF 24
* steem object in all classes is replaced by blockchain * steem object in all classes is replaced by blockchain
* Hive class has been added * Hive class has been added
* Hive and Steem are now BlockChainInstance classes * 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) * 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 * 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 * token_symbol, backed_token_symbol and vest_token_symbol
* Rename SteemWebsocket to NodeWebsocket and SteemNodeRPC to NodeRPC * 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 0.22.14
------- -------
......
...@@ -4,6 +4,7 @@ from datetime import timedelta ...@@ -4,6 +4,7 @@ from datetime import timedelta
import time import time
import io import io
from beem.blockchain import Blockchain from beem.blockchain import Blockchain
from beem.instance import shared_blockchain_instance
from beem.utils import parse_time from beem.utils import parse_time
import logging import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -22,5 +23,6 @@ class DemoBot(object): ...@@ -22,5 +23,6 @@ class DemoBot(object):
if __name__ == "__main__": if __name__ == "__main__":
tb = DemoBot() tb = DemoBot()
blockchain = Blockchain() blockchain = Blockchain()
print("Starting on %s network" % shared_blockchain_instance().get_blockchain_name())
for vote in blockchain.stream(opNames=["comment"]): for vote in blockchain.stream(opNames=["comment"]):
tb.comment(vote) tb.comment(vote)
...@@ -4,6 +4,7 @@ from datetime import timedelta ...@@ -4,6 +4,7 @@ from datetime import timedelta
import time import time
import io import io
from beem.blockchain import Blockchain from beem.blockchain import Blockchain
from beem.instance import shared_blockchain_instance
from beem.utils import parse_time from beem.utils import parse_time
import logging import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -25,5 +26,6 @@ class DemoBot(object): ...@@ -25,5 +26,6 @@ class DemoBot(object):
if __name__ == "__main__": if __name__ == "__main__":
tb = DemoBot() tb = DemoBot()
blockchain = Blockchain() blockchain = Blockchain()
print("Starting on %s network" % shared_blockchain_instance().get_blockchain_name())
for vote in blockchain.stream(opNames=["vote"]): for vote in blockchain.stream(opNames=["vote"]):
tb.vote(vote) tb.vote(vote)
...@@ -21,8 +21,8 @@ class Testcases(unittest.TestCase): ...@@ -21,8 +21,8 @@ class Testcases(unittest.TestCase):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
nodelist = NodeList() nodelist = NodeList()
nodelist.update_nodes(steem_instance=Steem(node=nodelist.get_nodes(hive=True), num_retries=10)) nodelist.update_nodes(steem_instance=Steem(node=nodelist.get_hive_nodes(), num_retries=10))
node_list = nodelist.get_nodes(hive=True) node_list = nodelist.get_hive_nodes()
cls.bts = Steem( cls.bts = Steem(
node=node_list, node=node_list,
...@@ -34,7 +34,7 @@ class Testcases(unittest.TestCase): ...@@ -34,7 +34,7 @@ class Testcases(unittest.TestCase):
) )
acc = Account("fullnodeupdate", steem_instance=cls.bts) 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 cls.authorperm = comment.authorperm
[author, permlink] = resolve_authorperm(cls.authorperm) [author, permlink] = resolve_authorperm(cls.authorperm)
cls.author = author cls.author = author
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment