Skip to content

Commit e91adc1

Browse files
committed
Removed unnecessary logging
1 parent bcbfc2e commit e91adc1

File tree

9 files changed

+3
-26
lines changed

9 files changed

+3
-26
lines changed

channels/channelmgr.go

-7
This file was deleted.

litinit.go

-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ func litSetup(conf *litConfig) *[32]byte {
113113

114114
keyFilePath := filepath.Join(conf.LitHomeDir, defaultKeyFileName)
115115

116-
logging.Infof("Getting key from path: %s", keyFilePath)
117116
// read key file (generate if not found)
118117
key, err := lnutil.ReadKeyFile(keyFilePath)
119118
if err != nil {

litrpc/chancmds.go

-4
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ type FundReply struct {
150150

151151
func (r *LitRPC) FundChannel(args FundArgs, reply *FundReply) error {
152152
var err error
153-
logging.Infof("got fundchannel rpc, handling")
154153
if r.Node.InProg != nil && r.Node.InProg.PeerIdx != 0 {
155154
return fmt.Errorf("channel with peer %d not done yet", r.Node.InProg.PeerIdx)
156155
}
@@ -166,8 +165,6 @@ func (r *LitRPC) FundChannel(args FundArgs, reply *FundReply) error {
166165
args.InitialSend, args.Capacity)
167166
}
168167

169-
logging.Infof("Got past initial checks")
170-
171168
wal := r.Node.SubWallet[args.CoinType]
172169
if wal == nil {
173170
return fmt.Errorf("No wallet of cointype %d linked", args.CoinType)
@@ -185,7 +182,6 @@ func (r *LitRPC) FundChannel(args FundArgs, reply *FundReply) error {
185182
}
186183

187184
spendable := allPorTxos.SumWitness(nowHeight)
188-
logging.Infof("Spendable txos: %d", spendable)
189185

190186
if args.Capacity > spendable-wal.Fee()*consts.JusticeTxBump {
191187
return fmt.Errorf("Wanted %d but %d available for channel creation",

lnutil/tracker.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func Announce(priv *koblitz.PrivateKey, port int, litadr string, trackerURL stri
3939
Timeout: time.Second * 4, // 4+4 to accomodate the 10s RPC timeout
4040
}
4141
strport := ":" + strconv.Itoa(port)
42-
resp, err := client.Get("https://myexternalip.com/raw")
42+
resp, err := client.Get("https://ipv4.myexternalip.com/raw")
4343
if err != nil {
4444
return err
4545
}
@@ -55,9 +55,9 @@ func Announce(priv *koblitz.PrivateKey, port int, litadr string, trackerURL stri
5555
/* TODO: Find a better way to get this information. Their
5656
* SSL cert doesn't work for IPv6.
5757
*/
58-
resp, err = client.Get("http://6.ipquail.com/ip")
58+
resp, err = client.Get("http://ipv6.myexternalip.com/raw")
5959
if err != nil {
60-
logging.Debugf("%v", err)
60+
logging.Errorf("%v", err)
6161
} else {
6262
defer resp.Body.Close()
6363
buf = new(bytes.Buffer)

qln/close.go

-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ func (nd *LitNode) CloseReqHandler(msg lnutil.CloseReqMsg) {
211211

212212
// Broadcast that we've closed a channel
213213
closed := ChannelStateUpdateEvent{
214-
// I really don't know what the ChanIdx is
215214
Action: "closed",
216215
ChanIdx: q.Idx(),
217216
State: q.State,

qln/fund.go

-1
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,6 @@ func (nd *LitNode) SigProofHandler(msg lnutil.SigProofMsg, peer *RemotePeer) {
736736
existingPeer := nd.PeerMan.GetPeerByIdx(int32(peerIdx))
737737

738738
sigProofEvent := ChannelStateUpdateEvent{
739-
// I really don't know what the ChanIdx is
740739
Action: "sigproof",
741740
ChanIdx: qc.Idx(),
742741
State: qc.State,

qln/init.go

-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package qln
22

33
import (
44
"fmt"
5-
"log"
65
"path/filepath"
76
"sync"
87

@@ -27,8 +26,6 @@ func NewLitNode(privKey *[32]byte, path string, trackerURL string, proxyURL stri
2726

2827
var err error
2928

30-
log.Printf("====== MODIFIED LIT NODE ======\n")
31-
3229
// Maybe make a new parameter set for "LN".. meh
3330
// TODO change this to a non-coin
3431
rootPrivKey, err := hdkeychain.NewMaster(privKey[:], &coinparam.TestNet3Params)

qln/lndb.go

-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"sync"
88
"time"
99

10-
"github.com/mit-dci/lit/channels"
1110
"github.com/boltdb/bolt"
1211
"github.com/mit-dci/lit/crypto/koblitz"
1312
"github.com/mit-dci/lit/dlc"
@@ -89,9 +88,6 @@ type LitNode struct {
8988
// p2p remote control key
9089
DefaultRemoteControlKey *koblitz.PublicKey
9190

92-
// channel management
93-
ChanMan *channels.ChannelManager
94-
9591
// event bus
9692
Events *eventbus.EventBus
9793

uspv/hardmode.go

-2
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ func (s *SPVCon) IngestBlock(m *wire.MsgBlock) {
192192
newBlockHash := m.Header.BlockHash()
193193
if !hah.blockhash.IsEqual(&newBlockHash) {
194194
logging.Errorf("Full block out of order error\n")
195-
logging.Errorf("Expected block hash: %x\n", hah.blockhash.CloneBytes())
196-
logging.Errorf("Actual block hash: %x\n", newBlockHash.CloneBytes())
197195
return
198196
}
199197

0 commit comments

Comments
 (0)