mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 11:09:23 +01:00
multi: fix linter errors
This commit is contained in:
parent
1fb05e0436
commit
6f51b941df
3 changed files with 10 additions and 7 deletions
|
@ -553,7 +553,7 @@ func TestChannelStateTransition(t *testing.T) {
|
||||||
commitDiff.Commitment.RemoteBalance += htlcAmt
|
commitDiff.Commitment.RemoteBalance += htlcAmt
|
||||||
commitDiff.LogUpdates = []LogUpdate{}
|
commitDiff.LogUpdates = []LogUpdate{}
|
||||||
if err := channel.AppendRemoteCommitChain(commitDiff); err != nil {
|
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 {
|
if err := channel.AdvanceCommitChainTail(); err != nil {
|
||||||
t.Fatalf("unable to append to revocation log: %v", err)
|
t.Fatalf("unable to append to revocation log: %v", err)
|
||||||
|
|
|
@ -442,14 +442,17 @@ func (d *DB) MarkChanFullyClosed(chanPoint *wire.OutPoint) error {
|
||||||
|
|
||||||
chanID := b.Bytes()
|
chanID := b.Bytes()
|
||||||
|
|
||||||
closedChanBucket, err := tx.CreateBucketIfNotExists(closedChannelBucket)
|
closedChanBucket, err := tx.CreateBucketIfNotExists(
|
||||||
|
closedChannelBucket,
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
chanSummaryBytes := closedChanBucket.Get(chanID)
|
chanSummaryBytes := closedChanBucket.Get(chanID)
|
||||||
if chanSummaryBytes == nil {
|
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)
|
chanSummaryReader := bytes.NewReader(chanSummaryBytes)
|
||||||
|
@ -472,9 +475,9 @@ func (d *DB) MarkChanFullyClosed(chanPoint *wire.OutPoint) error {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// syncVersions function is used for safe db version synchronization. It applies
|
// syncVersions function is used for safe db version synchronization. It
|
||||||
// migration functions to the current database and recovers the previous
|
// applies migration functions to the current database and recovers the
|
||||||
// state of db if at least one error/panic appeared during migration.
|
// previous state of db if at least one error/panic appeared during migration.
|
||||||
func (d *DB) syncVersions(versions []version) error {
|
func (d *DB) syncVersions(versions []version) error {
|
||||||
meta, err := d.FetchMeta(nil)
|
meta, err := d.FetchMeta(nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -40,7 +40,7 @@ const (
|
||||||
MsgCommitSig = 132
|
MsgCommitSig = 132
|
||||||
MsgRevokeAndAck = 133
|
MsgRevokeAndAck = 133
|
||||||
MsgUpdateFailMalformedHTLC = 135
|
MsgUpdateFailMalformedHTLC = 135
|
||||||
MsgChannelReestablish = 136
|
MsgChannelReestablish = 136
|
||||||
MsgUpdateFee = 137
|
MsgUpdateFee = 137
|
||||||
MsgChannelAnnouncement = 256
|
MsgChannelAnnouncement = 256
|
||||||
MsgNodeAnnouncement = 257
|
MsgNodeAnnouncement = 257
|
||||||
|
|
Loading…
Add table
Reference in a new issue