watchtower: rename SessionPrivKey to SessionKeyECDH
This commit is contained in:
parent
140731af00
commit
b0cb110e86
@ -362,7 +362,7 @@ func getClientSessions(db DB, keyRing SecretKeyRing, forTower *wtdb.TowerID,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s.SessionPrivKey = sessionKey
|
||||
s.SessionKeyECDH = sessionKey
|
||||
|
||||
// If an optional filter was provided, use it to filter out any
|
||||
// undesired sessions.
|
||||
|
@ -428,7 +428,7 @@ func (n *sessionNegotiator) tryAddress(privKey *btcec.PrivateKey,
|
||||
RewardPkScript: rewardPkScript,
|
||||
},
|
||||
Tower: tower,
|
||||
SessionPrivKey: privKey,
|
||||
SessionKeyECDH: privKey,
|
||||
ID: sessionID,
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ func (q *sessionQueue) sessionManager() {
|
||||
// drainBackups attempts to send all pending updates in the queue to the tower.
|
||||
func (q *sessionQueue) drainBackups() {
|
||||
// First, check that we are able to dial this session's tower.
|
||||
conn, err := q.cfg.Dial(q.cfg.ClientSession.SessionPrivKey, q.towerAddr)
|
||||
conn, err := q.cfg.Dial(q.cfg.ClientSession.SessionKeyECDH, q.towerAddr)
|
||||
if err != nil {
|
||||
log.Errorf("SessionQueue(%s) unable to dial tower at %v: %v",
|
||||
q.ID(), q.towerAddr, err)
|
||||
|
@ -60,12 +60,12 @@ type ClientSession struct {
|
||||
// tower with TowerID.
|
||||
Tower *Tower
|
||||
|
||||
// SessionPrivKey is the ephemeral secret key used to connect to the
|
||||
// watchtower.
|
||||
// SessionKeyECDH is the ECDH capable wrapper of the ephemeral secret
|
||||
// key used to connect to the watchtower.
|
||||
//
|
||||
// NOTE: This value is not serialized. It is derived using the KeyIndex
|
||||
// on startup to avoid storing private keys on disk.
|
||||
SessionPrivKey *btcec.PrivateKey
|
||||
SessionKeyECDH *btcec.PrivateKey
|
||||
}
|
||||
|
||||
// ClientSessionBody represents the primary components of a ClientSession that
|
||||
|
Loading…
Reference in New Issue
Block a user