multi: formatting and comment fixes
This commit is contained in:
160 files changed
+159
-260
No files matched your search
@@ -89,6 +89,7 @@ func (b *mockBackend) PublishTransaction(tx *wire.MsgTx, _ string) error {
|
||||
|
||||
func (b *mockBackend) ListUnspentWitnessFromDefaultAccount(minConfs, maxConfs int32) (
|
||||
[]*lnwallet.Utxo, error) {
|
||||
|
||||
b.lock.Lock()
|
||||
defer b.lock.Unlock()
|
||||
|
||||
|
||||
+2
-3
@@ -544,6 +544,7 @@ func (s *UtxoSweeper) collector(blockEpochs <-chan *chainntnfs.BlockEpoch) {
|
||||
var prevExclGroup *uint64
|
||||
if pendInput.params.ExclusiveGroup != nil &&
|
||||
input.params.ExclusiveGroup == nil {
|
||||
|
||||
prevExclGroup = new(uint64)
|
||||
*prevExclGroup = *pendInput.params.ExclusiveGroup
|
||||
}
|
||||
@@ -801,7 +802,7 @@ func (s *UtxoSweeper) bucketForFeeRate(
|
||||
// createInputClusters creates a list of input clusters from the set of pending
|
||||
// inputs known by the UtxoSweeper. It clusters inputs by
|
||||
// 1) Required tx locktime
|
||||
// 2) Similar fee rates
|
||||
// 2) Similar fee rates.
|
||||
func (s *UtxoSweeper) createInputClusters() []inputCluster {
|
||||
inputs := s.pendingInputs
|
||||
|
||||
@@ -982,7 +983,6 @@ func zipClusters(as, bs []inputCluster) []inputCluster {
|
||||
a := as[i]
|
||||
|
||||
switch {
|
||||
|
||||
// If the fee rate for the next one from bs is at least a's, we
|
||||
// merge.
|
||||
case j < len(bs) && bs[j].sweepFeeRate >= a.sweepFeeRate:
|
||||
@@ -1017,7 +1017,6 @@ func mergeClusters(a, b inputCluster) []inputCluster {
|
||||
newCluster := inputCluster{}
|
||||
|
||||
switch {
|
||||
|
||||
// Incompatible locktimes, return the sets without merging them.
|
||||
case a.lockTime != nil && b.lockTime != nil && *a.lockTime != *b.lockTime:
|
||||
return []inputCluster{a, b}
|
||||
|
||||
@@ -1763,7 +1763,6 @@ func TestLockTimes(t *testing.T) {
|
||||
t.Fatalf("Input required locktime %v, sweep "+
|
||||
"tx had locktime %v", lt, sweepTx.LockTime)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ func (m *MockNotifier) Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Started checks if started
|
||||
// Started checks if started.
|
||||
func (m *MockNotifier) Started() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -210,7 +210,6 @@ func (t *txInputSet) addToState(inp input.Input, constraints addConstraints) *tx
|
||||
inputYield := s.totalOutput() - t.totalOutput()
|
||||
|
||||
switch constraints {
|
||||
|
||||
// Don't sweep inputs that cost us more to sweep than they give us.
|
||||
case constraintsRegular:
|
||||
if inputYield <= 0 {
|
||||
|
||||
@@ -234,7 +234,6 @@ func TestTxInputSetRequiredOutput(t *testing.T) {
|
||||
change = set.changeOutput
|
||||
if change != 1000 {
|
||||
t.Fatalf("expected change to be %v, had %v", 1000, change)
|
||||
|
||||
}
|
||||
require.True(t, set.enoughInput())
|
||||
}
|
||||
Reference in new issue
Block a user