routing+routerrpc: rename max_shards to max_parts

Don't introduce a new term and align with the P in MPP.
This commit is contained in:
Joost Jager
2020-04-22 09:19:11 +02:00
parent 8d7e07d96b
commit f6b2410011
11 changed files with 169 additions and 169 deletions

View File

@@ -85,7 +85,7 @@ type mppSendTestCase struct {
graph func(g *mockGraph)
expectedFailure bool
maxShards uint32
maxParts uint32
}
const (
@@ -152,7 +152,7 @@ var mppTestCases = []mppSendTestCase{
chans: []uint64{chanSourceIm2, chanIm2Target},
},
},
maxShards: 1000,
maxParts: 1000,
},
// Test that a cap on the max htlcs makes it impossible to pay.
@@ -165,7 +165,7 @@ var mppTestCases = []mppSendTestCase{
expectedAttempts: 2,
expectedSuccesses: []expectedHtlcSuccess{},
expectedFailure: true,
maxShards: 1,
maxParts: 1,
},
// Test that an attempt is made to split the payment in multiple parts
@@ -190,7 +190,7 @@ var mppTestCases = []mppSendTestCase{
},
},
expectedFailure: true,
maxShards: 1000,
maxParts: 1000,
},
// Test that no attempts are made if the total local balance is
@@ -203,7 +203,7 @@ var mppTestCases = []mppSendTestCase{
amt: 300000,
expectedAttempts: 0,
expectedFailure: true,
maxShards: 10,
maxParts: 10,
},
}
@@ -226,7 +226,7 @@ func testMppSend(t *testing.T, testCase *mppSendTestCase) {
ctx.amt = lnwire.NewMSatFromSatoshis(testCase.amt)
attempts, err := ctx.testPayment(testCase.maxShards)
attempts, err := ctx.testPayment(testCase.maxParts)
switch {
case err == nil && testCase.expectedFailure:
t.Fatal("expected payment to fail")