lnwallet: rename DelayKey->ToLocalKey, NoDelayKey->ToRemoteKey
Since both parties are going to have their ouputs delayed, we move way from the DelayKey naming, and instead use ToLocalKey and ToRemoteKey.
This commit is contained in:
7 files changed
+61
-49
No files matched your search
@@ -189,7 +189,7 @@ func (t *backupTask) craftSessionPayload(
|
||||
justiceKit := &blob.JusticeKit{
|
||||
SweepAddress: t.sweepPkScript,
|
||||
RevocationPubKey: toBlobPubKey(keyRing.RevocationKey),
|
||||
LocalDelayPubKey: toBlobPubKey(keyRing.DelayKey),
|
||||
LocalDelayPubKey: toBlobPubKey(keyRing.ToLocalKey),
|
||||
CSVDelay: t.breachInfo.RemoteDelay,
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ func (t *backupTask) craftSessionPayload(
|
||||
// output to spend from.
|
||||
if t.toRemoteInput != nil {
|
||||
justiceKit.CommitToRemotePubKey = toBlobPubKey(
|
||||
keyRing.NoDelayKey,
|
||||
keyRing.ToRemoteKey,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -121,8 +121,8 @@ func genTaskTest(
|
||||
BreachTransaction: breachTxn,
|
||||
KeyRing: &lnwallet.CommitmentKeyRing{
|
||||
RevocationKey: revPK,
|
||||
DelayKey: toLocalPK,
|
||||
NoDelayKey: toRemotePK,
|
||||
ToLocalKey: toLocalPK,
|
||||
ToRemoteKey: toRemotePK,
|
||||
},
|
||||
RemoteDelay: csvDelay,
|
||||
}
|
||||
@@ -565,9 +565,9 @@ func testBackupTask(t *testing.T, test backupTaskTest) {
|
||||
}
|
||||
|
||||
keyRing := test.breachInfo.KeyRing
|
||||
expToLocalPK := keyRing.DelayKey.SerializeCompressed()
|
||||
expToLocalPK := keyRing.ToLocalKey.SerializeCompressed()
|
||||
expRevPK := keyRing.RevocationKey.SerializeCompressed()
|
||||
expToRemotePK := keyRing.NoDelayKey.SerializeCompressed()
|
||||
expToRemotePK := keyRing.ToRemoteKey.SerializeCompressed()
|
||||
|
||||
// Assert that the blob contained the serialized revocation and to-local
|
||||
// pubkeys.
|
||||
|
||||
@@ -291,8 +291,8 @@ func (c *mockChannel) createRemoteCommitTx(t *testing.T) {
|
||||
|
||||
commitKeyRing := &lnwallet.CommitmentKeyRing{
|
||||
RevocationKey: c.revPK,
|
||||
NoDelayKey: c.toLocalPK,
|
||||
DelayKey: c.toRemotePK,
|
||||
ToRemoteKey: c.toLocalPK,
|
||||
ToLocalKey: c.toRemotePK,
|
||||
}
|
||||
|
||||
retribution := &lnwallet.BreachRetribution{
|
||||
|
||||
Reference in new issue
Block a user