mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-09 12:22:38 +01:00
routing: payment splitting pre-check
This commit reverts cb4cd49dc8 to bring
back the insufficient local balance failure.
Distinguishing betweeen this failure and a regular "no route" failure
prevents meaningless htlcs from being sent out.
This commit is contained in:
@@ -192,6 +192,19 @@ var mppTestCases = []mppSendTestCase{
|
||||
expectedFailure: true,
|
||||
maxShards: 1000,
|
||||
},
|
||||
|
||||
// Test that no attempts are made if the total local balance is
|
||||
// insufficient.
|
||||
{
|
||||
name: "insufficient total balance",
|
||||
graph: func(g *mockGraph) {
|
||||
twoPathGraph(g, 100000, 500000)
|
||||
},
|
||||
amt: 300000,
|
||||
expectedAttempts: 0,
|
||||
expectedFailure: true,
|
||||
maxShards: 10,
|
||||
},
|
||||
}
|
||||
|
||||
// TestMppSend tests that a payment can be completed using multiple shards.
|
||||
|
||||
Reference in New Issue
Block a user