lnwire: remove the HTLC timeout msg in favor of a HTLC cancel msg

This commit removes the previous HTLC timeout in message in favor of a
HTLC cancel message. Within the protocol, a timeout message would never
be sent backwards along the route as in the case of an HTLC timeout
before/after the grace period, the course of action taken would be to
broadcast the current commitment transaction unilaterally on-chain.
This commit is contained in:
Olaoluwa Osuntokun committed 2016-09-22 18:51:51 -07:00
1 parent e6ced8ee7a
commit 7d0e1576ec
5 files changed
+140 -140

No files matched your search

+7 -7
View File
@@ -34,11 +34,11 @@ const (
CmdCloseComplete = uint32(310)
// Commands for negotiating HTLCs.
CmdHTLCAddRequest = uint32(1000)
CmdHTLCAddAccept = uint32(1010)
CmdHTLCAddReject = uint32(1020)
CmdHTLCSettleRequest = uint32(1100)
CmdHTLCTimeoutRequest = uint32(1300)
CmdHTLCAddRequest = uint32(1000)
CmdHTLCAddAccept = uint32(1010)
CmdHTLCAddReject = uint32(1020)
CmdHTLCSettleRequest = uint32(1100)
CmdCancelHTLC = uint32(1300)
// Commands for modifying commitment transactions.
CmdCommitSignature = uint32(2000)
@@ -94,8 +94,8 @@ func makeEmptyMessage(command uint32) (Message, error) {
msg = &HTLCAddReject{}
case CmdHTLCSettleRequest:
msg = &HTLCSettleRequest{}
case CmdHTLCTimeoutRequest:
msg = &HTLCTimeoutRequest{}
case CmdCancelHTLC:
msg = &CancelHTLC{}
case CmdCommitSignature:
msg = &CommitSignature{}
case CmdCommitRevocation: