lndc: remove print debug print statements
This commit is contained in:
parent
850feed877
commit
9b5e487893
10
lndc/conn.go
10
lndc/conn.go
@ -121,9 +121,6 @@ func (c *LNDConn) Dial(
|
||||
return err
|
||||
}
|
||||
|
||||
// display private key for debug only
|
||||
fmt.Printf("made session key %x\n", sessionKey)
|
||||
|
||||
c.myNonceInt = 1 << 63
|
||||
c.remoteNonceInt = 0
|
||||
|
||||
@ -229,7 +226,6 @@ func (c *LNDConn) authPKH(
|
||||
return err
|
||||
}
|
||||
idDH := fastsha256.Sum256(btcec.GenerateSharedSecret(myId, theirPub))
|
||||
fmt.Printf("made idDH %x\n", idDH)
|
||||
theirDHproof := btcutil.Hash160(append(localEphPubBytes, idDH[:]...))
|
||||
|
||||
// Verify that their DH proof matches the one we just generated.
|
||||
@ -274,14 +270,10 @@ func (c *LNDConn) Read(b []byte) (n int, err error) {
|
||||
var nonceBuf [8]byte
|
||||
binary.BigEndian.PutUint64(nonceBuf[:], c.remoteNonceInt)
|
||||
|
||||
fmt.Printf("decrypt %d byte from %x nonce %d\n",
|
||||
len(ctext), c.RemoteLNId, c.remoteNonceInt)
|
||||
|
||||
c.remoteNonceInt++ // increment remote nonce, no matter what...
|
||||
|
||||
msg, err := c.chachaStream.Open(nil, nonceBuf[:], ctext, nil)
|
||||
if err != nil {
|
||||
fmt.Printf("decrypt %d byte ciphertext failed\n", len(ctext))
|
||||
return 0, err
|
||||
}
|
||||
|
||||
@ -301,8 +293,6 @@ func (c *LNDConn) Write(b []byte) (n int, err error) {
|
||||
if b == nil {
|
||||
return 0, fmt.Errorf("write to %x nil", c.RemoteLNId)
|
||||
}
|
||||
fmt.Printf("Encrypt %d byte plaintext to %x nonce %d\n",
|
||||
len(b), c.RemoteLNId, c.myNonceInt)
|
||||
|
||||
// first encrypt message with shared key
|
||||
var nonceBuf [8]byte
|
||||
|
Loading…
Reference in New Issue
Block a user