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:
5 files changed
+140
-140
No files matched your search
+7
-7
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user