channeldb: remove RevocationDelay field from the HTLC struct
This commit removes the RevocationDelay field from the HTLC struct as with the latest commitment transaction scheme, it is no longer needed. This is due to the fact the the delay is now observed when an on-chain HTLC claim is attempted, rather than from Shane the HTLC itself has been broadcast.
This commit is contained in:
2 files changed
+17
-31
No files matched your search
+13
-13
@@ -205,12 +205,11 @@ func TestOpenChannelPutGetDelete(t *testing.T) {
|
||||
}
|
||||
state.Htlcs = []*HTLC{
|
||||
{
|
||||
Signature: testSig.Serialize(),
|
||||
Incoming: true,
|
||||
Amt: 10,
|
||||
RHash: key,
|
||||
RefundTimeout: 1,
|
||||
RevocationDelay: 2,
|
||||
Signature: testSig.Serialize(),
|
||||
Incoming: true,
|
||||
Amt: 10,
|
||||
RHash: key,
|
||||
RefundTimeout: 1,
|
||||
},
|
||||
}
|
||||
if err := state.FullSync(); err != nil {
|
||||
@@ -348,18 +347,19 @@ func TestChannelStateTransition(t *testing.T) {
|
||||
incoming = true
|
||||
}
|
||||
htlc := &HTLC{
|
||||
Signature: testSig.Serialize(),
|
||||
Incoming: incoming,
|
||||
Amt: 10,
|
||||
RHash: key,
|
||||
RefundTimeout: i,
|
||||
RevocationDelay: i + 2,
|
||||
OutputIndex: int32(i * 3),
|
||||
Signature: testSig.Serialize(),
|
||||
Incoming: incoming,
|
||||
Amt: 10,
|
||||
RHash: key,
|
||||
RefundTimeout: i,
|
||||
OutputIndex: int32(i * 3),
|
||||
}
|
||||
htlcs = append(htlcs, htlc)
|
||||
htlcAmt += htlc.Amt
|
||||
}
|
||||
|
||||
// TODO(roasbeef): ensure that expiry matches
|
||||
|
||||
// Create a new channel delta which includes the above HTLCs, some
|
||||
// balance updates, and an increment of the current commitment height.
|
||||
// Additionally, modify the signature and commitment transaction.
|
||||
|
||||
Reference in new issue
Block a user