Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

Commit 915107d

Browse files
committed
Disable not working nodes and improve beempy sign and broadcast
* Improve file reading for beempy sign and broadcast * add option to write file for beempy sign
1 parent a34baff commit 915107d

7 files changed

Lines changed: 25 additions & 12 deletions

File tree

beem/cli.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,23 +1670,33 @@ def disapprovewitness(witness, account):
16701670

16711671

16721672
@cli.command()
1673-
@click.option('--file', help='Load transaction from file. If "-", read from stdin (defaults to "-")')
1674-
def sign(file):
1673+
@click.option('--file', '-i', help='Load transaction from file. If "-", read from stdin (defaults to "-")')
1674+
@click.option('--outfile', '-o', help='Load transaction from file. If "-", read from stdin (defaults to "-")')
1675+
def sign(file, outfile):
16751676
"""Sign a provided transaction with available and required keys"""
16761677
stm = shared_steem_instance()
16771678
if stm.rpc is not None:
16781679
stm.rpc.rpcconnect()
1680+
if not unlock_wallet(stm):
1681+
return
16791682
if file and file != "-":
16801683
if not os.path.isfile(file):
16811684
raise Exception("File %s does not exist!" % file)
16821685
with open(file) as fp:
16831686
tx = fp.read()
1687+
if tx.find('\0') > 0:
1688+
with open(file, encoding='utf-16') as fp:
1689+
tx = fp.read()
16841690
else:
16851691
tx = click.get_text_stream('stdin')
16861692
tx = ast.literal_eval(tx)
16871693
tx = stm.sign(tx)
16881694
tx = json.dumps(tx, indent=4)
1689-
print(tx)
1695+
if outfile and outfile != "-":
1696+
with open(outfile, 'w') as fp:
1697+
fp.write(tx)
1698+
else:
1699+
print(tx)
16901700

16911701

16921702
@cli.command()
@@ -1701,6 +1711,9 @@ def broadcast(file):
17011711
raise Exception("File %s does not exist!" % file)
17021712
with open(file) as fp:
17031713
tx = fp.read()
1714+
if tx.find('\0') > 0:
1715+
with open(file, encoding='utf-16') as fp:
1716+
tx = fp.read()
17041717
else:
17051718
tx = click.get_text_stream('stdin')
17061719
tx = ast.literal_eval(tx)

beem/nodelist.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def __init__(self):
122122
"version": "0.20.2",
123123
"type": "appbase",
124124
"owner": "themarkymark",
125-
"score": 20
125+
"score": -20
126126
},
127127
{
128128
"url": "wss://gtg.steem.house:8090",
@@ -213,7 +213,7 @@ def __init__(self):
213213
"version": "0.20.6",
214214
"type": "appbase",
215215
"owner": "anyx",
216-
"score": 50
216+
"score": -10
217217
},
218218
{
219219
"url": "https://anyx.io",
@@ -227,14 +227,14 @@ def __init__(self):
227227
"version": "0.20.2",
228228
"type": "appbase",
229229
"owner": "curie",
230-
"score": -10
230+
"score": 50
231231
},
232232
{
233233
"url": "wss://rpc.curiesteem.com",
234234
"version": "0.20.2",
235235
"type": "appbase",
236236
"owner": "curie",
237-
"score": 50
237+
"score": -10
238238
},
239239
{
240240
"url": "wss://testnet.steem.vc",

beem/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""THIS FILE IS GENERATED FROM beem SETUP.PY."""
2-
version = '0.20.14'
2+
version = '0.20.15'

beemapi/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""THIS FILE IS GENERATED FROM beem SETUP.PY."""
2-
version = '0.20.14'
2+
version = '0.20.15'

beembase/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""THIS FILE IS GENERATED FROM beem SETUP.PY."""
2-
version = '0.20.14'
2+
version = '0.20.15'

beemgraphenebase/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""THIS FILE IS GENERATED FROM beem SETUP.PY."""
2-
version = '0.20.14'
2+
version = '0.20.15'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
ascii = codecs.lookup('ascii')
1717
codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs'))
1818

19-
VERSION = '0.20.14'
19+
VERSION = '0.20.15'
2020

2121
tests_require = ['mock >= 2.0.0', 'pytest', 'pytest-mock', 'parameterized']
2222

0 commit comments

Comments
 (0)