lndc: remove print debug print statements

This commit is contained in:
Olaoluwa Osuntokun 2016-07-12 17:04:09 -07:00
parent 850feed877
commit 9b5e487893
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
1 changed files with 0 additions and 10 deletions

View File

@ -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