Revert "htlcswitch: in event of duplicate link add, prefer newer link"
This reverts commit e60d2b774a.
This commit is contained in:
1 parent
6989316b11
commit
1113684dc3
3 files changed
+64
-5
No files matched your search
@@ -1776,11 +1776,11 @@ func (s *Switch) AddLink(link ChannelLink) error {
|
||||
|
||||
chanID := link.ChanID()
|
||||
|
||||
// If a link already exists, then remove the prior one so we can
|
||||
// replace it with this fresh instance.
|
||||
// First, ensure that this link is not already active in the switch.
|
||||
_, err := s.getLink(chanID)
|
||||
if err == nil {
|
||||
s.removeLink(chanID)
|
||||
return fmt.Errorf("unable to add ChannelLink(%v), already "+
|
||||
"active", chanID)
|
||||
}
|
||||
|
||||
// Get and attach the mailbox for this link, which buffers packets in
|
||||
|
||||
Reference in new issue
Block a user