Skip to content
  • Iustin Pop's avatar
    Fix node partial name matching in Haskell code · 91c1a265
    Iustin Pop authored
    
    
    This implements QffHostname and fixes the node listing (as well as
    export listing when filtering on node name).
    
    This bug was hidden by the fact that node listing with "gnt-node list
    aa" works if you don't have live queries (as it was originally), as
    the choosing of wanted nodes out of the config based on short names
    works. What didn't work was later post-filtering based on such short
    names (kind of duplicate, but that's how the code path is).
    
    By implementing QffHostname, we can have custom equality checks, like
    in the Python code. What I don't like is how convoluted the testing on
    various left/right combinations is, but I didn't find an easier way.
    
    The included unittest tests the partial filtering behaviour, and fails
    if the node name flag is not set to QffHostname.
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    91c1a265