mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
funding: rename from router graph to graph
This commit is contained in:
@@ -1140,13 +1140,13 @@ func assertChannelReadySent(t *testing.T, alice, bob *testNode,
|
||||
assertDatabaseState(t, bob, fundingOutPoint, channelReadySent)
|
||||
}
|
||||
|
||||
func assertAddedToRouterGraph(t *testing.T, alice, bob *testNode,
|
||||
func assertAddedToGraph(t *testing.T, alice, bob *testNode,
|
||||
fundingOutPoint *wire.OutPoint) {
|
||||
|
||||
t.Helper()
|
||||
|
||||
assertDatabaseState(t, alice, fundingOutPoint, addedToRouterGraph)
|
||||
assertDatabaseState(t, bob, fundingOutPoint, addedToRouterGraph)
|
||||
assertDatabaseState(t, alice, fundingOutPoint, addedToGraph)
|
||||
assertDatabaseState(t, bob, fundingOutPoint, addedToGraph)
|
||||
}
|
||||
|
||||
// assertChannelAnnouncements checks that alice and bob both sends the expected
|
||||
@@ -1523,7 +1523,7 @@ func testNormalWorkflow(t *testing.T, chanType *lnwire.ChannelType) {
|
||||
assertChannelAnnouncements(t, alice, bob, capacity, nil, nil, nil, nil)
|
||||
|
||||
// Check that the state machine is updated accordingly
|
||||
assertAddedToRouterGraph(t, alice, bob, fundingOutPoint)
|
||||
assertAddedToGraph(t, alice, bob, fundingOutPoint)
|
||||
|
||||
// The funding transaction is now confirmed, wait for the
|
||||
// OpenStatusUpdate_ChanOpen update
|
||||
@@ -1877,7 +1877,7 @@ func TestFundingManagerRestartBehavior(t *testing.T) {
|
||||
assertChannelAnnouncements(t, alice, bob, capacity, nil, nil, nil, nil)
|
||||
|
||||
// Check that the state machine is updated accordingly
|
||||
assertAddedToRouterGraph(t, alice, bob, fundingOutPoint)
|
||||
assertAddedToGraph(t, alice, bob, fundingOutPoint)
|
||||
|
||||
// Next, we check that Alice sends the announcement signatures
|
||||
// on restart after six confirmations. Bob should as expected send
|
||||
@@ -2042,7 +2042,7 @@ func TestFundingManagerOfflinePeer(t *testing.T) {
|
||||
assertChannelAnnouncements(t, alice, bob, capacity, nil, nil, nil, nil)
|
||||
|
||||
// Check that the state machine is updated accordingly
|
||||
assertAddedToRouterGraph(t, alice, bob, fundingOutPoint)
|
||||
assertAddedToGraph(t, alice, bob, fundingOutPoint)
|
||||
|
||||
// The funding transaction is now confirmed, wait for the
|
||||
// OpenStatusUpdate_ChanOpen update
|
||||
@@ -2501,7 +2501,7 @@ func TestFundingManagerReceiveChannelReadyTwice(t *testing.T) {
|
||||
assertChannelAnnouncements(t, alice, bob, capacity, nil, nil, nil, nil)
|
||||
|
||||
// Check that the state machine is updated accordingly
|
||||
assertAddedToRouterGraph(t, alice, bob, fundingOutPoint)
|
||||
assertAddedToGraph(t, alice, bob, fundingOutPoint)
|
||||
|
||||
// The funding transaction is now confirmed, wait for the
|
||||
// OpenStatusUpdate_ChanOpen update
|
||||
@@ -2594,7 +2594,7 @@ func TestFundingManagerRestartAfterChanAnn(t *testing.T) {
|
||||
assertChannelAnnouncements(t, alice, bob, capacity, nil, nil, nil, nil)
|
||||
|
||||
// Check that the state machine is updated accordingly
|
||||
assertAddedToRouterGraph(t, alice, bob, fundingOutPoint)
|
||||
assertAddedToGraph(t, alice, bob, fundingOutPoint)
|
||||
|
||||
// The funding transaction is now confirmed, wait for the
|
||||
// OpenStatusUpdate_ChanOpen update
|
||||
@@ -2698,7 +2698,7 @@ func TestFundingManagerRestartAfterReceivingChannelReady(t *testing.T) {
|
||||
assertChannelAnnouncements(t, alice, bob, capacity, nil, nil, nil, nil)
|
||||
|
||||
// Check that the state machine is updated accordingly
|
||||
assertAddedToRouterGraph(t, alice, bob, fundingOutPoint)
|
||||
assertAddedToGraph(t, alice, bob, fundingOutPoint)
|
||||
|
||||
// Notify that six confirmations has been reached on funding
|
||||
// transaction.
|
||||
@@ -2912,9 +2912,9 @@ func TestFundingManagerPrivateRestart(t *testing.T) {
|
||||
// announcements.
|
||||
assertChannelAnnouncements(t, alice, bob, capacity, nil, nil, nil, nil)
|
||||
|
||||
// Note: We don't check for the addedToRouterGraph state because in
|
||||
// Note: We don't check for the addedToGraph state because in
|
||||
// the private channel mode, the state is quickly changed from
|
||||
// addedToRouterGraph to deleted from the database since the public
|
||||
// addedToGraph to deleted from the database since the public
|
||||
// announcement phase is skipped.
|
||||
|
||||
// The funding transaction is now confirmed, wait for the
|
||||
@@ -4563,8 +4563,8 @@ func testZeroConf(t *testing.T, chanType *lnwire.ChannelType) {
|
||||
// We'll now wait for the OpenStatusUpdate_ChanOpen update.
|
||||
waitForOpenUpdate(t, updateChan)
|
||||
|
||||
// Assert that both Alice & Bob are in the addedToRouterGraph state.
|
||||
assertAddedToRouterGraph(t, alice, bob, fundingOp)
|
||||
// Assert that both Alice & Bob are in the addedToGraph state.
|
||||
assertAddedToGraph(t, alice, bob, fundingOp)
|
||||
|
||||
// We'll now restart Alice's funding manager and assert that the tx
|
||||
// is rebroadcast.
|
||||
|
Reference in New Issue
Block a user