htlcswitch: update mockServer to be able to fail test directly

This commit is contained in:
Olaoluwa Osuntokun committed 2017-11-10 19:51:03 -08:00
1 parent a48ceac98f
commit 9873d4ece8
4 files changed
+56 -90

No files matched your search

+3 -4
View File
@@ -673,13 +673,12 @@ func createClusterChannels(aliceToBob, bobToCarol btcutil.Amount) (
//
func newThreeHopNetwork(t *testing.T, aliceChannel, firstBobChannel,
secondBobChannel, carolChannel *lnwallet.LightningChannel,
serverErr chan error,
startingHeight uint32) *threeHopNetwork {
// Create three peers/servers.
aliceServer := newMockServer("alice", serverErr)
bobServer := newMockServer("bob", serverErr)
carolServer := newMockServer("carol", serverErr)
aliceServer := newMockServer(t, "alice")
bobServer := newMockServer(t, "bob")
carolServer := newMockServer(t, "carol")
// Create mock decoder instead of sphinx one in order to mock the
// route which htlc should follow.