2022 Dec 22
Learned about
cargo clean
.cargo build
creates thetarget
folder with build artifacts, but these can get corrupted/outdated and cause build problems.cargo clean
just removes this directory from what I can tell which forces cargo to rebuild from scratch which can solve this build issues. ChatGPT helped me discover this when I was having build problems on Rust 1.48.0 but no compilation errors.Did quite a bit of refactoring today in my PR I’ve been working on. Feeling pretty good about my changes now. Feel like the code is pretty readable. Main thing I could see feedback being on is just the practicality of this whole PR, i.e. is it really necessary to add this functionality to what is meant to be a relatively simple sample node; is it adding too much complexity? We’ll see. Got a maintainer to approve running CI and it passed. Hopefully will get some feedback tomorrow morning and I can get this merged sometime in the near future. Getting closer to my first contribution!
Becoming more and more familiar with all the ways to unwrap and handle
Result
andOption
. Check out this block:get_rpc_auth_from_cookie(None, Some(network), None) .or(get_rpc_auth_from_env_file(None)) .or(get_rpc_auth_from_env_vars()) .or({ println!("ERROR: unable to get bitcoind RPC username and password"); print_rpc_auth_help(); Err(()) })?
Pretty nice right?