File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -3359,6 +3359,20 @@ func TestAddChannelEdgeShellNodes(t *testing.T) {
3359
3359
// error.
3360
3360
err = graph .AddChannelEdge (& edgeInfo )
3361
3361
require .ErrorIs (t , err , ErrEdgeAlreadyExist )
3362
+
3363
+ // Show that updating the shell node to a full node record works.
3364
+ err = graph .AddLightningNode (node2 )
3365
+ _ , ok := graph .V1Store .(* KVStore )
3366
+ if ok {
3367
+ require .NoError (t , err )
3368
+ } else {
3369
+ // Currently the SQL UpsertNode query prevents us from updating
3370
+ // the node record if the current record's last_update field
3371
+ // is null (which is the case for node2). This is a bug that
3372
+ // will be fixed in the following commit.
3373
+ require .ErrorContains (t , graph .AddLightningNode (node2 ),
3374
+ "sql: no rows in result set" )
3375
+ }
3362
3376
}
3363
3377
3364
3378
// TestNodePruningUpdateIndexDeletion tests that once a node has been removed
You can’t perform that action at this time.
0 commit comments