lightninglabs / lightninglabs/pool

ListLeases: fix lease chain fee estimation for Taproot accounts

Open
#431 0 comments 0 reactions 1 assignee Claimed by @ffranr View on GitHub
Dominant language
Go
Stars
259
Forks
51
PR merge metrics
No merged PRs in 30d

Description

There is a [TODO](https://github.com/lightninglabs/pool/blob/master/rpcserver.go#L2424) 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).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.