Description
It is true that certain tx features require a minimum transaction version. Instead of erroring, we should just bump the transaction version.
This removes an error variant. It is the caller's responsibility to not pick inputs that require spending paths which require transaction versions that they do not wish to create.
Proposed Changes
- Rename
PsbtParams::version to PsbtParams::min_version.
- Tx version is bumped to
Version::TWO if any input requires CSV. AFS also bumps the tx version if the sequence branch is picked.
- Update docs.
- Remove the
UnsupportedVersion error in CreatePsbtError.
Description
It is true that certain tx features require a minimum transaction version. Instead of erroring, we should just bump the transaction version.
This removes an error variant. It is the caller's responsibility to not pick inputs that require spending paths which require transaction versions that they do not wish to create.
Proposed Changes
PsbtParams::versiontoPsbtParams::min_version.Version::TWOif any input requires CSV. AFS also bumps the tx version if the sequence branch is picked.UnsupportedVersionerror inCreatePsbtError.