graph/db: add FundingPKScript method on ChannelEdgeInfo
Add FundingPKScript() method that returns the funding output's pkScript for the channel. The implementation is version-aware: - V1: generates a 2-of-2 multisig P2WSH script from the two bitcoin keys - V2: will use taproot script (to be implemented) This encapsulates the script generation logic and makes it clear which bitcoin keys are being used. Replaces direct calls to genMultiSigP2WSH with the cleaner method call.
This commit is contained in:
4 files changed
+38
-17
No files matched your search
@@ -2768,6 +2768,7 @@ func (s *SQLStore) ChannelView() ([]EdgePoint, error) {
|
||||
handleChannel := func(_ context.Context,
|
||||
channel sqlc.ListChannelsPaginatedRow) error {
|
||||
|
||||
// TODO(elle): update to handle V2 channels.
|
||||
pkScript, err := genMultiSigP2WSH(
|
||||
channel.BitcoinKey1, channel.BitcoinKey2,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user