Integration tests for the HTTP and Electrum APIs#60
Integration tests for the HTTP and Electrum APIs#60shesek merged 8 commits intoBlockstream:new-indexfrom
Conversation
|
|
||
| log::info!("node params: {:?}", params); | ||
|
|
||
| generate(node_client, 101).chain_err(|| "failed initializing blocks")?; |
There was a problem hiding this comment.
nit: you only need to generate 2 blocks on Liquid
There was a problem hiding this comment.
is it worth adding a #cfg[] block for this?
There was a problem hiding this comment.
not sure, it's just a small speed up, feel free to ignore
|
|
||
| use bitcoind::bitcoincore_rpc::RpcApi; | ||
| use electrumd::jsonrpc::serde_json::json; | ||
| use electrumd::ElectrumD; |
There was a problem hiding this comment.
Why have you decided to use electrumd instead of electrum-client?
There was a problem hiding this comment.
electrumd runs the electrum wallet side, as an headless JSONRPC server daemon.
I could use electrum-client to connect to the JSONRPC, but electrumd already provides an internal client for that purpose (I created electrumd based on the bitcoind crate by @RCasatta, which uses the jsonrpc crate)
|
|
||
| use noded::bitcoincore_rpc::{self, RpcApi}; | ||
|
|
||
| use electrs::{ |
There was a problem hiding this comment.
Have you avoided electrsd because it does not allow enough control on electrs internals?
There was a problem hiding this comment.
Using electrsd would tie us to the electrs version shipped with it, I wanted the tests to run directly against the work dir code base.
|
Why 462222b is marked as "unverified"? |
|
utACK 126dc19 with minor comments, code review Very nice to have the test infrastructure and all of these tests added! |
|
I force-pushed to rebase over the recent changes in #59. This also re-signed all the commits. |
Using the headless Electrum wallet daemon: https://electrum.readthedocs.io/en/latest/jsonrpc.html
Using the `elementsd` crate to spawn a regtest elements envirnoment.
Confidentiality, asset issuance and signed blocks (dynafed)
Based on top of #59, which should get merged first. Replaces #46.
Uses the
bitcoindandelementsdcrates to setup a regtest testing environmentIncludes tests for the HTTP API. Covers all the important endpoints but does not extensively test the all the response fields.
Includes tests for the Electrum JSONRPC server, using an headless Electrum wallet (
electrumd)Includes tests for Elements-specific functionality (confidentiality, asset issuance and dynafed - but not for peg in/out which is not enabled in the regtest environment)
Includes a Github Actions CI runner