-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Static references don't run their destructors. This means we can end up leaking resources after running the test suite. This issue is only related to tests and not a bug in the library.
rust-esplora-client/src/lib.rs
Lines 281 to 291 in 9305e41
| lazy_static! { | |
| static ref BITCOIND: corepc_node::Node = { | |
| let bitcoind_exe = env::var("BITCOIND_EXE") | |
| .ok() | |
| .or_else(|| corepc_node::downloaded_exe_path().ok()) | |
| .expect( | |
| "you need to provide an env var BITCOIND_EXE or specify a bitcoind version feature", | |
| ); | |
| let conf = corepc_node::Conf::default(); | |
| corepc_node::Node::with_conf(bitcoind_exe, &conf).unwrap() | |
| }; |
To reproduce
cargo test -- --test-threads=1ps aux | grep bitcoind
Additional Context
oleonardolima and luisschwab
Metadata
Metadata
Assignees
Labels
No labels