-
Notifications
You must be signed in to change notification settings - Fork 70
feat: implement missing methods #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement missing methods #143
Conversation
cd95f3f to
a391f24
Compare
Pull Request Test Coverage Report for Build 19939369053Details
💛 - Coveralls |
a391f24 to
30e3b95
Compare
30e3b95 to
f010183
Compare
|
As it has a couple of commits, I'd check first if it is in the final state, ready for review ? |
|
FWIW, supersedes the methods from #127. |
8379e8a to
6dc0ba7
Compare
Yes, it's ready. |
ValuedMammal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm about half way done reviewing this, will follow up soon with the rest.
9812292 to
ecfdece
Compare
ValuedMammal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I verified that the endpoints exist and the types match the responses from esplora. Verified the code is the same for both async and blocking.
- I tested the new APIs on a fork of
esplora-cli. - I ran the tests locally
Additional thoughts:
- There's some
cargo docwarnings due to unresolved rustdoc links - We could eventually change or deprecate
get_blockswhich currently returnsVec<BlockSummary>to return a list ofBlockInformationwhich is the more complete block summary. - The tests feel a bit heavy. As a client library we should only care that the request succeeds and we can parse the response - not necessarily the values returned from the server. Also, since all of the tests share the same BITCOIND instance, some tests seem to rely on the output of other tests making it hard to run a single test in isolation (e.g.
test_get_block_txs). This can make ongoing maintenance harder in the future. - You could consider combining the mempool-related tests into one test and avoid having the "sleep 5 seconds" logic in multiple places.
I'll open a follow up PR that fixes these, adds all the missing documentation, adds #![warn(missing_docs)] to lib.rs and add cargo doc to CI.
Indeed, this is a better approach
Yes, but we have to do it after the next release cc @oleonardolima
I was trying to check if the |
ecfdece to
7e142a7
Compare
6868e62 to
ed0b4a8
Compare
oleonardolima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, it looks good, but I haven't tested it locally yet.
I left a few nits and suggestions.
ed0b4a8 to
eed3bdb
Compare
oleonardolima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK eed3bdb
It looks good, you'll just need to fix the MSRV CI step, you can do it in this PR or another, I'm fine either way.
|
All green now |
oleonardolima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 5d8bcf8
oleonardolima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 5d8bcf8
|
Friendly ping @ValuedMammal |
Signed-off-by: valued mammal <valuedmammal@protonmail.com>
Signed-off-by: valued mammal <valuedmammal@protonmail.com>
ValuedMammal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 5d8bcf8
ValuedMammal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK cb0f920
This PR implements the missing methods needed to be feature complete with the Esplora API specification.
Also adds
Bitcoin Dev Kit DeveloperstoauthorsonCargo.toml, pins tracing to 0.1.41, and log to 0.4.28 for the 1.63.0 MSRV.Changelog
OutputSpendStatusstructScriptHashTxsSummaryandScriptHashStatsstructsBlockInformationstructMempoolStatsstructMempoolRecentTxsstructInvalidStartIndexValueerror variantget_tx_outspendsmethod (GET /tx/:txid/outspends)get_scripthash_statsmethod (GET /scripthash/:hash)get_mempool_address_txsmethod (GET /address/:address/txs/mempool)get_mempool_scripthash_txsmethod (GET /scripthash/:hash/txs/mempool)get_scripthash_utxosmethod (GET /scripthash/:hash/utxo)get_block_infomethod (GET /block/:hash)get_block_txidsmethod (GET /block/:hash/txids)get_block_txsmethod (GET /block/:hash/txs[/:start_index])get_mempool_statsmethod (GET /mempool)get_mempool_txidsmethod (GET /mempool/txids)get_mempool_recent_txidsmethod (GET /mempool/recent)