Skip to content

Commit

Permalink
log token hash on deprecated api use
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Feb 8, 2024
1 parent 044bf3d commit 2424289
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion channel_opener_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 2424289

Please sign in to comment.