fundingmanager test: check that error is sent on timeout

This commit is contained in:
Johan T. Halseth 2018-05-30 12:51:44 +02:00
parent d20cb8e2f6
commit 3d964628f0
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -1447,6 +1447,9 @@ func TestFundingManagerFundingTimeout(t *testing.T) {
Height: fundingBroadcastHeight + 288,
}
// Bob should have sent an Error message to Alice.
assertErrorSent(t, bob.msgChan)
// Should not be pending anymore.
assertNumPendingChannelsBecomes(t, bob, 0)
}
@ -1511,6 +1514,9 @@ func TestFundingManagerFundingNotTimeoutInitiator(t *testing.T) {
// Since Alice was the initiator, the channel should not have timed out
assertNumPendingChannelsRemains(t, alice, 1)
// Bob should have sent an Error message to Alice.
assertErrorSent(t, bob.msgChan)
// Since Bob was not the initiator, the channel should timeout
assertNumPendingChannelsBecomes(t, bob, 0)
}