1. Coarsely crush chilies and mustard seed using a mortar and pestle, or seal spices in a heavy plastic food bag and roughly crush with a rolling pin.
2. In a 2- to 3-quart pan, combine the chili mixture, ginger, garlic, pineapple with juice, vinegar, sugar, and salt. Bring to a boil over high heat, then lower heat to medium and simmer, uncovered, stirring occasionally, until most of the liquid has evaporated, 35 to 40 minutes.
3. Stir in walnuts. Serve warm or cool. Cover and chill up to 1 week.
Nutritional analysis per tablespoon.