minor edit

This commit is contained in:
Joseph Poon 2016-01-14 18:51:08 -08:00 committed by Olaoluwa Osuntokun
parent 0d896f7fc1
commit b0ce9a06dc

@ -228,6 +228,7 @@ func (l *LNChannel) CreateHTLC(h *PaymentDescriptor) error {
//Validate the data //Validate the data
err = l.validateHTLC(h, false) err = l.validateHTLC(h, false)
if err != nil { if err != nil {
l.Unlock()
return err return err
} }
//Update state as pre-commit //Update state as pre-commit
@ -239,7 +240,7 @@ func (l *LNChannel) CreateHTLC(h *PaymentDescriptor) error {
} else { } else {
//Future version may be able to do this.. //Future version may be able to do this..
l.Unlock() l.Unlock()
fmt.Errorf("Cannot pull money") return fmt.Errorf("Cannot pull money")
} }
return nil return nil