Skip to content

Commit

Permalink
multi: fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Roasbeef committed Nov 11, 2017
1 parent 1fb05e0 commit 6f51b94
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion channeldb/channel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ func TestChannelStateTransition(t *testing.T) {
commitDiff.Commitment.RemoteBalance += htlcAmt
commitDiff.LogUpdates = []LogUpdate{}
if err := channel.AppendRemoteCommitChain(commitDiff); err != nil {
t.Fatal("unable to add to commit chain: %v", err)
t.Fatalf("unable to add to commit chain: %v", err)
}
if err := channel.AdvanceCommitChainTail(); err != nil {
t.Fatalf("unable to append to revocation log: %v", err)
Expand Down
13 changes: 8 additions & 5 deletions channeldb/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,17 @@ func (d *DB) MarkChanFullyClosed(chanPoint *wire.OutPoint) error {

chanID := b.Bytes()

closedChanBucket, err := tx.CreateBucketIfNotExists(closedChannelBucket)
closedChanBucket, err := tx.CreateBucketIfNotExists(
closedChannelBucket,
)
if err != nil {
return err
}

chanSummaryBytes := closedChanBucket.Get(chanID)
if chanSummaryBytes == nil {
return fmt.Errorf("no closed channel by that chanID found")
return fmt.Errorf("no closed channel by that chanID " +
"found")
}

chanSummaryReader := bytes.NewReader(chanSummaryBytes)
Expand All @@ -472,9 +475,9 @@ func (d *DB) MarkChanFullyClosed(chanPoint *wire.OutPoint) error {
})
}

// syncVersions function is used for safe db version synchronization. It applies
// migration functions to the current database and recovers the previous
// state of db if at least one error/panic appeared during migration.
// syncVersions function is used for safe db version synchronization. It
// applies migration functions to the current database and recovers the
// previous state of db if at least one error/panic appeared during migration.
func (d *DB) syncVersions(versions []version) error {
meta, err := d.FetchMeta(nil)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion lnwire/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const (
MsgCommitSig = 132
MsgRevokeAndAck = 133
MsgUpdateFailMalformedHTLC = 135
MsgChannelReestablish = 136
MsgChannelReestablish = 136
MsgUpdateFee = 137
MsgChannelAnnouncement = 256
MsgNodeAnnouncement = 257
Expand Down

0 comments on commit 6f51b94

Please sign in to comment.