Let n be a positive integer, and let A be a set of k≥2n−1 integers. For the restricted sumset Sn(A)={a1+⋯+an:a1,…,an∈A,andai2=aj2for1≤i<j≤n}, by a 2002 result of Liu and Sun we have ∣Sn(A)∣≥(k−1)n−23n(n−1)+1. In this paper, we determine the structure of A when the lower bound is attained.