Uh oh!
There was an error while loading. Please reload this page.
Use async with esplora-reqwest - #115
Conversation
29ffb54 to
6ca43c7Compare6ca43c7 to
2d8b1faComparerajarshimaitra
commented
Aug 29, 2022
I am not sure if this is us or some problem with generic https calls with async-reqwest, but I am getting this error while trying out a wallet sync But ureq is working fine on the same esplora endpoint.. |
| esplora-ureq = ["esplora", "bdk/use-esplora-ureq"] | ||
| esplora-reqwest = ["esplora", "bdk/use-esplora-reqwest"] | ||
| async-interface = ["bdk/async-interface"] | ||
| esplora-reqwest = ["esplora", "bdk/use-esplora-reqwest", "async-interface"] |
There was a problem hiding this comment.
Ah found the problem.. We need to also enable default-tls for reqwest..
| esplora-reqwest = ["esplora", "bdk/use-esplora-reqwest", "async-interface"] | |
| esplora-reqwest = ["esplora", "bdk/use-esplora-reqwest", "bdk/reqwest-default-tls", "async-interface"] |
notmandatory
commented
Aug 29, 2022
if we're not going to revert #114 then this PR also needs to be rebased. :-) |
maybe_async is used regardless of which feature is activated, so it shouldn't be behind the cfg()
2d8b1fa to
3b36277CompareRebased :) |
This seems to be the issue if you use the % RUST_LOG=debug cargo run --features esplora-reqwest -- wallet --descriptor "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)" sync
...
ERROR bdk_cli] Esplora(Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("blockstream.info")), port: None, path: "/testnet/api//scripthash/ca0948ef1c5bf5a023f22ed75275d7491c194476c11fbcfc63c0d25ed8234124/txs", query: None, fragment: None }, source: hyper::Error(Connect, "invalid URL, scheme is not http") }))I confirmed that with @raj's suggestion this problem is fixed. We don't have any CI tests for this sort of thing so only found with the manual testing, not sure it's worth setting up integration tests for this project which is sort of meant to be used for manual testing (and other stuff). |
rajarshimaitra
commented
Aug 30, 2022
Its definitely worth setting up one, and now that we have automated backend we can use that to cook up a very simple integration test framework using std library only, where we can test out basic operations. This is included in this commit 2302ff5 of #102 . Its still very basic but it works for Rpc and Electrum. Esplora is disabled for now because I was facing some issues with it.. |
rajarshimaitra
commented
Aug 30, 2022
Yes as @notmandatory noted, we don't have functional tests yet for bdk-cli. We only check for clap structures and some few other functions.. |
3b36277 to
81e7226Comparedanielabrozzoni
commented
Aug 30, 2022
Thanks for the explanation, I just updated the PR 🙏🏻 |
notmandatory
commented
Aug 31, 2022
@rajarshimaitra is it ok to merge this before #102? I don't think it will conflict much. |
rajarshimaitra
commented
Sep 2, 2022
Yes it is.. I will rebase #102 once this is in.. |
| regex = { version = "1", optional = true } | ||
| bdk-reserves = { version = "0.19", optional = true} | ||
| electrsd = { version= "0.12", features = ["trigger", "bitcoind_22_0"], optional = true} | ||
| tokio = { version = "1", features = ["rt", "macros", "rt-multi-thread"] } |
There was a problem hiding this comment.
This should be optional and only included with async-interface
81e7226 to
3ad5b02CompareWe previously had the esplora-reqwest feature, but it would use sync reqwest, as the "async-interface" feature in BDK wasn't set. This commit sets this feature so that using `esplora-reqwest` always uses async mode.
3ad5b02 to
8d876efCompare
Description
We previously had the esplora-reqwest feature, but it would use
sync reqwest, as the "async-interface" feature in BDK wasn't set.
This commit sets this feature so that using
esplora-reqwestalwaysuses async mode.
Notes to the reviewers
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
CHANGELOG.md