Skip to content

ListLeases: fix lease chain fee estimation for Taproot accounts #431

@guggero

Description

@guggero

There is a TODO in the code from when we introduced Taproot channels. The chain fees paid for executing an order is dependent on the account version (P2WSH vs. P2TR). But at the time of the Taproot upgrade PR it looked like it wouldn't be easy to find out what version an account was at the time of the executed batch, so the calculation still assumes P2WSH for every batch. But it looks like we can just use the Version of the account in the Accounts map of the batch.
I'm not sure what version of the account will be stored in the batch if in that batch the account is auto-upgraded from P2WSH (version 0) to P2TR (version 1). So that might be an edge case to consider and test (there are integration tests covering all of this).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions