rust-bitcoin / bitcoind

Utility to launch a regtest bitcoind process in a rust test
MIT License
41 stars 34 forks source link

make every version imply the one before it #117

Closed apoelstra closed 1 year ago

apoelstra commented 1 year ago

This allows the library to be compiled with any combination of versions of Bitcoin Core -- it will just use the highest one.

This won't guarantee compatibility because Bitcoin Core sometimes makes backward-compatibility breaking changes ... but it is much better than the current situation where if you specify multiple feature flags, the library won't compile at all.

apoelstra commented 1 year ago

I'm confused by these errors -- it seems that I've broken the version detection somehow, but I don't understand how.

RCasatta commented 1 year ago

After staring at versions the last 10 minutes I think I get it, I think the logic in versions.rs should be version_x, not version_x+1 but we have version_x, not version_x-1

apoelstra commented 1 year ago

Ah! Yep, good catch!

Also I made some typos in versions.rs.

RCasatta commented 1 year ago

could you please squash this last fix for mac 66a5d09570d6620e0a5a4bd5a512353cbcd8809c

apoelstra commented 1 year ago

Done. Thank you!! Sorry for so many iterations.

RCasatta commented 1 year ago

ACK c06ee2fb8b96e8703ab157490b4486432e7a866f

Thank you for this great idea to make features non-exclusive!

Going to release soon

apoelstra commented 1 year ago

Hooray! Thanks for accepting. Once we release I'll go try to update elementsd to use this new release, and a similar idea (which is actually what I'm trying to do here :P)