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:
Joost Jager
2020-04-16 10:45:00 +02:00
parent f44a9e1d4c
commit 7fc1938f10
5 changed files with 63 additions and 18 deletions

View File

@@ -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.