Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
beem
Commits
332b6906
Commit
332b6906
authored
4 years ago
by
Holger
Browse files
Options
Downloads
Patches
Plain Diff
Fix unit test and typo
parent
b0cf5d84
No related branches found
No related tags found
2 merge requests
!5
Taken current version of master branch in the https://github.com/holgern/beem
,
!4
Original changes pushed to master at https://github.com/holgern/beem
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.rst
+1
-0
1 addition, 0 deletions
CHANGELOG.rst
beem/blockchaininstance.py
+3
-1
3 additions, 1 deletion
beem/blockchaininstance.py
beem/storage.py
+28
-27
28 additions, 27 deletions
beem/storage.py
tests/beem/test_witness.py
+1
-1
1 addition, 1 deletion
tests/beem/test_witness.py
with
33 additions
and
29 deletions
CHANGELOG.rst
+
1
−
0
View file @
332b6906
...
...
@@ -10,6 +10,7 @@ Changelog
* Wallet.store has now the Key Interface that handles key management
* Token handling has been removed from Wallet
* Token storage has been move from wallet to SteemConnect/HiveSigner
* handle virtual ops batch streaming fixed thanks to @crokkon
0.23.13
-------
...
...
This diff is collapsed.
Click to expand it.
beem/blockchaininstance.py
+
3
−
1
View file @
332b6906
...
...
@@ -798,8 +798,10 @@ class BlockChainInstance(object):
"""
Returns the default nodes
"""
if
"
node
"
in
self
.
config
:
nodes
=
self
.
config
[
"
node
"
]
elif
"
nodes
"
in
config
:
elif
"
nodes
"
in
self
.
config
:
nodes
=
self
.
config
[
"
nodes
"
]
elif
"
node
"
in
self
.
config
.
defaults
:
nodes
=
self
.
config
[
"
node
"
]
elif
"
default_nodes
"
in
self
.
config
and
bool
(
self
.
config
[
"
default_nodes
"
]):
nodes
=
self
.
config
[
"
default_nodes
"
]
else
:
...
...
This diff is collapsed.
Click to expand it.
beem/storage.py
+
28
−
27
View file @
332b6906
...
...
@@ -29,36 +29,37 @@ from beemstorage import (
timeformat
=
"
%Y%m%d-%H%M%S
"
#: Default configuration
nodelist
=
NodeList
()
blockchain
=
"
hive
"
if
blockchain
==
"
hive
"
:
nodes
=
nodelist
.
get_hive_nodes
(
testnet
=
False
)
elif
blockchain
==
"
steem
"
:
nodes
=
nodelist
.
get_steem_nodes
(
testnet
=
False
)
else
:
nodes
=
[]
SqliteConfigurationStore
.
setdefault
(
"
node
"
,
nodes
)
SqliteConfigurationStore
.
setdefault
(
"
default_chain
"
,
blockchain
)
SqliteConfigurationStore
.
setdefault
(
"
password_storage
"
,
"
environment
"
)
SqliteConfigurationStore
.
setdefault
(
"
rpcpassword
"
,
""
)
SqliteConfigurationStore
.
setdefault
(
"
rpcuser
"
,
""
)
SqliteConfigurationStore
.
setdefault
(
"
order-expiration
"
,
7
*
24
*
60
*
60
)
SqliteConfigurationStore
.
setdefault
(
"
client_id
"
,
""
)
SqliteConfigurationStore
.
setdefault
(
"
sc2_client_id
"
,
None
)
SqliteConfigurationStore
.
setdefault
(
"
hs_client_id
"
,
None
)
SqliteConfigurationStore
.
setdefault
(
"
hot_sign_redirect_uri
"
,
None
)
SqliteConfigurationStore
.
setdefault
(
"
sc2_api_url
"
,
"
https://api.steemconnect.com/api/
"
)
SqliteConfigurationStore
.
setdefault
(
"
oauth_base_url
"
,
"
https://api.steemconnect.com/oauth2/
"
)
SqliteConfigurationStore
.
setdefault
(
"
hs_api_url
"
,
"
https://hivesigner.com/api/
"
)
SqliteConfigurationStore
.
setdefault
(
"
hs_oauth_base_url
"
,
"
https://hivesigner.com/oauth2/
"
)
SqliteConfigurationStore
.
setdefault
(
"
default_canonical_url
"
,
"
https://hive.blog
"
)
SqliteConfigurationStore
.
setdefault
(
"
default_path
"
,
"
48
'
/13
'
/0
'
/0
'
/0
'"
)
def
generate_config_store
(
config
,
blockchain
=
"
hive
"
):
#: Default configuration
nodelist
=
NodeList
()
if
blockchain
==
"
hive
"
:
nodes
=
nodelist
.
get_hive_nodes
(
testnet
=
False
)
elif
blockchain
==
"
steem
"
:
nodes
=
nodelist
.
get_steem_nodes
(
testnet
=
False
)
else
:
nodes
=
[]
config
.
setdefault
(
"
node
"
,
nodes
)
config
.
setdefault
(
"
default_chain
"
,
blockchain
)
config
.
setdefault
(
"
password_storage
"
,
"
environment
"
)
config
.
setdefault
(
"
rpcpassword
"
,
""
)
config
.
setdefault
(
"
rpcuser
"
,
""
)
config
.
setdefault
(
"
order-expiration
"
,
7
*
24
*
60
*
60
)
config
.
setdefault
(
"
client_id
"
,
""
)
config
.
setdefault
(
"
sc2_client_id
"
,
None
)
config
.
setdefault
(
"
hs_client_id
"
,
None
)
config
.
setdefault
(
"
hot_sign_redirect_uri
"
,
None
)
config
.
setdefault
(
"
sc2_api_url
"
,
"
https://api.steemconnect.com/api/
"
)
config
.
setdefault
(
"
oauth_base_url
"
,
"
https://api.steemconnect.com/oauth2/
"
)
config
.
setdefault
(
"
hs_api_url
"
,
"
https://hivesigner.com/api/
"
)
config
.
setdefault
(
"
hs_oauth_base_url
"
,
"
https://hivesigner.com/oauth2/
"
)
config
.
setdefault
(
"
default_canonical_url
"
,
"
https://hive.blog
"
)
config
.
setdefault
(
"
default_path
"
,
"
48
'
/13
'
/0
'
/0
'
/0
'"
)
return
config
def
get_default_config_store
(
*
args
,
**
kwargs
):
return
SqliteConfigurationStore
(
*
args
,
**
kwargs
)
return
generate_config_store
(
SqliteConfigurationStore
,
blockchain
=
"
hive
"
)
(
*
args
,
**
kwargs
)
def
get_default_key_store
(
config
,
*
args
,
**
kwargs
):
...
...
This diff is collapsed.
Click to expand it.
tests/beem/test_witness.py
+
1
−
1
View file @
332b6906
...
...
@@ -141,7 +141,7 @@ class Testcases(unittest.TestCase):
w
=
Witness
(
owner
,
steem_instance
=
bts
)
keys
=
list
(
witness
.
keys
())
json_witness
=
w
.
json
()
exclude_list
=
[
'
votes
'
,
'
virtual_last_update
'
,
'
virtual_scheduled_time
'
]
exclude_list
=
[
'
votes
'
,
'
virtual_last_update
'
,
'
virtual_scheduled_time
'
,
'
last_aslot
'
,
'
last_confirmed_block_num
'
]
for
k
in
keys
:
if
k
not
in
exclude_list
:
if
isinstance
(
witness
[
k
],
dict
)
and
isinstance
(
json_witness
[
k
],
list
):
...
...
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