Skip to content

Document MSRV policy and change MSRV to 1.49.0 #547

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

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
strategy:
matrix:
rust:
- version: 1.56.0 # STABLE
- version: stable # STABLE
clippy: true
- version: 1.46.0 # MSRV
- version: 1.49.0 # MSRV
features:
- default
- minimal
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Increase project MSRV from 1.46.0 to 1.49.0, see new policy in README

## [v0.16.0] - [v0.15.0]

- Disable `reqwest` default features.
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ cargo test --features test-electrum
The other options are `test-esplora` or `test-rpc`.
Note that `electrs` and `bitcoind` binaries are automatically downloaded (on mac and linux), to specify you already have installed binaries you must use `--no-default-features` and provide `BITCOIND_EXE` and `ELECTRS_EXE` as environment variables.

## Supported Rust Versions

The BDK MSRV (minimum supported rust version) will be as low as possible to support required
dependencies and no higher than the [rustc](https://tracker.debian.org/pkg/rustc) version packaged
with the Debian ["testing"] release, and if possible the ["stable"] release. We will only increase
the BDK MSRV with a new MINOR release, never a PATCH release.

["testing"]: https://www.debian.org/releases/testing/
["stable"]: https://www.debian.org/releases/stable/

## License

Licensed under either of
Expand Down
2 changes: 1 addition & 1 deletion examples/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn main() -> Result<(), Box<dyn Error>> {

let network = matches
.value_of("network")
.map(|n| Network::from_str(n))
.map(Network::from_str)
.transpose()
.unwrap()
.unwrap_or(Network::Testnet);
Expand Down
1 change: 1 addition & 0 deletions src/blockchain/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ macro_rules! impl_inner_method {
/// It allows switching backend at runtime
///
/// See [this module](crate::blockchain::any)'s documentation for a usage example.
#[allow(clippy::large_enum_variant)] // TODO fix https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
pub enum AnyBlockchain {
#[cfg(feature = "electrum")]
#[cfg_attr(docsrs, doc(cfg(feature = "electrum")))]
Expand Down
4 changes: 2 additions & 2 deletions src/blockchain/compact_filters/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub struct Peer {
writer: Arc<Mutex<TcpStream>>,
responses: Arc<RwLock<ResponsesMap>>,

reader_thread: thread::JoinHandle<()>,
_reader_thread: thread::JoinHandle<()>,
connected: Arc<RwLock<bool>>,

mempool: Arc<Mempool>,
Expand Down Expand Up @@ -228,7 +228,7 @@ impl Peer {
Ok(Peer {
writer,
responses,
reader_thread,
_reader_thread: reader_thread,
connected,
mempool,
version,
Expand Down
4 changes: 2 additions & 2 deletions src/blockchain/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub struct RpcBlockchain {
/// Rpc client to the node, includes the wallet name
client: Client,
/// Network used
network: Network,
_network: Network,
/// Blockchain capabilities, cached here at startup
capabilities: HashSet<Capability>,
/// Skip this many blocks of the blockchain at the first rescan, if None the rescan is done from the genesis block
Expand Down Expand Up @@ -405,7 +405,7 @@ impl ConfigurableBlockchain for RpcBlockchain {

Ok(RpcBlockchain {
client,
network,
_network: network,
capabilities,
_storage_address: storage_address,
skip_blocks: config.skip_blocks,
Expand Down
1 change: 1 addition & 0 deletions src/wallet/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ impl FromStr for WalletExport {
}
}

#[allow(clippy::manual_split_once)]
fn remove_checksum(s: String) -> String {
s.splitn(2, '#').next().map(String::from).unwrap()
}
Expand Down
12 changes: 1 addition & 11 deletions src/wallet/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ impl SignersContainer {
/// Options for a software signer
///
/// Adjust the behavior of our software signers and the way a transaction is finalized
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Default)]
pub struct SignOptions {
/// Whether the signer should trust the `witness_utxo`, if the `non_witness_utxo` hasn't been
/// provided
Expand Down Expand Up @@ -479,16 +479,6 @@ pub struct SignOptions {
pub allow_all_sighashes: bool,
}

impl Default for SignOptions {
fn default() -> Self {
SignOptions {
trust_witness_utxo: false,
assume_height: None,
allow_all_sighashes: false,
}
}
}

pub(crate) trait ComputeSighash {
fn sighash(
psbt: &psbt::PartiallySignedTransaction,
Expand Down