Skip to content

Various small improvments to plugin_block_heights() , plugin_tx_fees() and logging.#6

Merged
ConanMishler merged 22 commits intoblocknetdx:mainfrom
tryiou:main
Jun 11, 2023
Merged

Various small improvments to plugin_block_heights() , plugin_tx_fees() and logging.#6
ConanMishler merged 22 commits intoblocknetdx:mainfrom
tryiou:main

Conversation

@tryiou
Copy link
Copy Markdown
Collaborator

@tryiou tryiou commented Jun 11, 2023

  • add coroutines usage to add concurrency in plugin_block_heights() and plugin_tx_fees().

  • change logging for those 2 functions to just display final result and not one line per coin result.

  • improve error logging for connection errors to containers.

  • update aiorpcX from 0.18.4 to 0.18.7.

tryiou added 22 commits June 11, 2023 12:16
add coroutine for faster process of few calls
trying to fix warning we see in logs:

plugin-adapter.py:806: RuntimeWarning: coroutine 'getutxos' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'getrawtransaction' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'getrawmempool' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'getblockcount' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'sendrawtransaction' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'gettransaction' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'getblock' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'getblockhash' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'plugin_block_heights' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'plugin_tx_fees' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'getbalance' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
plugin-adapter.py:806: RuntimeWarning: coroutine 'gethistory' was never awaited
  return web.Response(text=await switchcase(await request.json()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Copy link
Copy Markdown
Collaborator

@ConanMishler ConanMishler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ConanMishler ConanMishler merged commit 4c4d828 into blocknetdx:main Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants