Skip to content
Snippets Groups Projects
Commit 43423a41 authored by inso's avatar inso
Browse files

Remove blockRot from parameters

parent 4d3b7f37
No related branches found
No related tags found
No related merge requests found
...@@ -36,8 +36,6 @@ class BlockchainParameters: ...@@ -36,8 +36,6 @@ class BlockchainParameters:
avg_gen_time = attr.ib(convert=int, default=0, cmp=False, hash=False) avg_gen_time = attr.ib(convert=int, default=0, cmp=False, hash=False)
# The number of blocks required to evaluate again PoWMin value # The number of blocks required to evaluate again PoWMin value
dt_diff_eval = attr.ib(convert=int, default=0, cmp=False, hash=False) dt_diff_eval = attr.ib(convert=int, default=0, cmp=False, hash=False)
# The number of previous blocks to check for personalized difficulty
blocks_rot = attr.ib(convert=int, default=0, cmp=False, hash=False)
# The decimal percent of previous issuers to reach for personalized difficulty # The decimal percent of previous issuers to reach for personalized difficulty
percent_rot = attr.ib(convert=float, default=0, cmp=False, hash=False) percent_rot = attr.ib(convert=float, default=0, cmp=False, hash=False)
......
...@@ -211,7 +211,6 @@ class BlockchainProcessor: ...@@ -211,7 +211,6 @@ class BlockchainProcessor:
parameters = await self._bma_connector.get(currency, bma.blockchain.parameters) parameters = await self._bma_connector.get(currency, bma.blockchain.parameters)
blockchain.parameters.ms_validity = parameters['msValidity'] blockchain.parameters.ms_validity = parameters['msValidity']
blockchain.parameters.avg_gen_time = parameters['avgGenTime'] blockchain.parameters.avg_gen_time = parameters['avgGenTime']
blockchain.parameters.blocks_rot = parameters['blocksRot']
blockchain.parameters.c = parameters['c'] blockchain.parameters.c = parameters['c']
blockchain.parameters.dt = parameters['dt'] blockchain.parameters.dt = parameters['dt']
blockchain.parameters.dt_diff_eval = parameters['dtDiffEval'] blockchain.parameters.dt_diff_eval = parameters['dtDiffEval']
......
...@@ -169,7 +169,7 @@ class ConnectionConfigModel(QObject): ...@@ -169,7 +169,7 @@ class ConnectionConfigModel(QObject):
try: try:
data = await self.node_connector.safe_request(endpoint, bma.wot.lookup, data = await self.node_connector.safe_request(endpoint, bma.wot.lookup,
req_args={'search': search}, req_args={'search': search},
proxy=self.user_parameters.proxy()) proxy=self.app.parameters.proxy())
if data: if data:
registered = parser(data) registered = parser(data)
tries += 1 tries += 1
......
...@@ -92,7 +92,7 @@ if __name__ == '__main__': ...@@ -92,7 +92,7 @@ if __name__ == '__main__':
with loop: with loop:
app = Application.startup(sys.argv, sakia, loop) app = Application.startup(sys.argv, sakia, loop)
if not app.connection_exists(): if not app.connection_exists():
conn_controller = ConnectionConfigController.create(None, app) conn_controller = ConnectionConfigController.create_connection(None, app)
loop.run_until_complete(conn_controller.async_exec()) loop.run_until_complete(conn_controller.async_exec())
window = MainWindowController.startup(app) window = MainWindowController.startup(app)
loop.run_forever() loop.run_forever()
......
...@@ -121,7 +121,11 @@ class DocumentsService: ...@@ -121,7 +121,11 @@ class DocumentsService:
if isinstance(r, BaseException): if isinstance(r, BaseException):
result = (False, str(r)) result = (False, str(r))
else: else:
try:
result = (False, (await r.json())["message"]) result = (False, (await r.json())["message"])
except KeyError:
result = (False, await str(r.text()))
elif r.status == 200: elif r.status == 200:
result = (True, (await r.json())) result = (True, (await r.json()))
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment