bibajz / bitcoin-python-async-rpc

Minimal Bitcoin JSON-RPC Python asynchronous client
MIT License
31 stars 12 forks source link

Tests #5

Open bibajz opened 4 years ago

bibajz commented 4 years ago

Since version v0.3.1 I claim this package is python3.9 compatible. This statement is backed only by the fact I was able to install it on python3.9.0rc1 and call

...
>>> await rpc.getbestblockhash()
... yes, it does return correct hash 

That is weak.

To be confident this package is able to withstand production-level usage and reach v1 status, test suite must be devised.

bibajz commented 3 years ago

Commit https://github.com/bibajz/bitcoin-python-async-rpc/commit/645c25d0c69c5004d1f36849aeffb9a4f8a2c01e, which adds a script for running a regtest node in a Docker container, opens a possibility for creating a much better test suite.

The node in the container is however slightly out of date, running version v0.17.1, so explore other options and think about the possible ways how to test this library.

hianian commented 3 years ago

When I use the rpc.getrawtransaction() method, the running result has an Error: bitcoinrpc._exceptions.RPCError: (-32601, 'Method not found')

Also, there is another problem, when using the method await rpc.getblock(block_hash="d071aadc6febb4d47a41afec38baf1bcc69378e55aec10716cc0f27c61cb424c", verbosity=2), has an error 'bitcoinrpc._exceptions.RPCError: (-1, 'JSON value is not a boolean as expected')', but there don't have an JSON I input.

BastelPichi commented 1 year ago

When I use the rpc.getrawtransaction() method, the running result has an Error: bitcoinrpc._exceptions.RPCError: (-32601, 'Method not found')

Also, there is another problem, when using the method await rpc.getblock(block_hash="d071aadc6febb4d47a41afec38baf1bcc69378e55aec10716cc0f27c61cb424c", verbosity=2), has an error 'bitcoinrpc._exceptions.RPCError: (-1, 'JSON value is not a boolean as expected')', but there don't have an JSON I input.

Im not sure this is related to the actual issue here. Please open a seperate issue instead of simply hijacking one.