From 9a3a9178af1d9f64fde998515465383be38ab5c4 Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Thu, 8 Feb 2024 13:32:03 +0100 Subject: [PATCH] log token hash on deprecated api use --- channel_opener_server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channel_opener_server.go b/channel_opener_server.go index 6624977..4607531 100644 --- a/channel_opener_server.go +++ b/channel_opener_server.go @@ -2,6 +2,7 @@ package main import ( "context" + "crypto/sha256" "encoding/hex" "encoding/json" "fmt" @@ -136,7 +137,8 @@ func (s *channelOpenerServer) RegisterPayment( return nil, fmt.Errorf("invalid opening_fee_params") } } else { - log.Printf("DEPRECATED: RegisterPayment with deprecated fee mechanism.") + tokenHash := sha256.Sum256([]byte(token)) + log.Printf("DEPRECATED: RegisterPayment with deprecated fee mechanism. sha256 hash of token used: %x", tokenHash) pi.OpeningFeeParams = &lspdrpc.OpeningFeeParams{ MinMsat: uint64(node.NodeConfig.ChannelMinimumFeeMsat), Proportional: uint32(node.NodeConfig.ChannelFeePermyriad * 100),