Skip to content

Conversation

@RCasatta
Copy link
Member

Description

bitcoin 0.26.2 comes with a new base64 feature converting PSBT from/to string, this PR start using this feature.

Even though we use base64 only in tests (base64 is a dev-dep) downstream users will gain the advantage of not having to use an additional base64 dep to parse PSBTs

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

Cargo.toml Outdated
log = "^0.4"
miniscript = "5.1"
bitcoin = { version = "^0.26", features = ["use-serde"] }
bitcoin = { version = "^0.26", features = ["use-serde", "base64"] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to use a feature that is only available from 0.26.2 I think you'll have to change the version accordingly. I think ~0.26.2 is what we want here: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#tilde-requirements

@afilini afilini merged commit fe371f9 into bitcoindevkit:master Jun 11, 2021
@jb55
Copy link
Contributor

jb55 commented Jun 18, 2021

I get this error after this change:

    Updating git repository `https://github.com/bitcoindevkit/bdk`
    Updating crates.io index
error: failed to select a version for `bitcoin`.    ... required by package `electrum-client v0.7.0`
    ... which is depended on by `bdk v0.8.1-dev (https://github.com/bitcoindevkit/bdk?rev=9ff86ea37c2ecd99cea9f9713d73b64fefc94616#9ff86ea3)`
    ... which is depended on by `btcmerchant v0.1.0 (/home/jb55/src/rust/btcmerchant/btcmerchant)`
    ... which is depended on by `btcmerchant-server v0.1.0 (/home/jb55/src/rust/btcmerchant/btcmerchant-server)`
versions that meet the requirements `=0.26.0` are: 0.26.0

all possible versions conflict with previously selected packages.

  previously selected package `bitcoin v0.26.2`
    ... which is depended on by `bdk v0.8.1-dev (https://github.com/bitcoindevkit/bdk?rev=9ff86ea37c2ecd99cea9f9713d73b64fefc94616#9ff86ea3)`
    ... which is depended on by `btcmerchant v0.1.0 (/home/jb55/src/rust/btcmerchant/btcmerchant)`
    ... which is depended on by `btcmerchant-server v0.1.0 (/home/jb55/src/rust/btcmerchant/btcmerchant-server)`

failed to select a version for `bitcoin` which could resolve this conflict

looks like electrum-client needs to be bumped as well?

@notmandatory
Copy link
Member

notmandatory commented Jun 18, 2021

Which features are you using? the CI already checks all the features separately, and I confirmed on my local system (rust 1.51.0) bdk builds fine with the default features ("key-value-db", "electrum"). I also did a cargo update and still building OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants