fix: preserve futures token identity in canonical cache
Keep futureToken2Symbol keyed by raw futures token and use explicit spot-to-future alias mapping during resolver fallback lookups. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -26,15 +26,15 @@ func TestSelectCanonicalSymbolByQuotePriority_NoPreferredQuote(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNormalizeFutureToken_AppliesOverride(t *testing.T) {
|
||||
got := normalizeFutureToken("LUNA2")
|
||||
if got != "LUNA" {
|
||||
t.Fatalf("expected LUNA, got %q", got)
|
||||
func TestFutureCacheTokenKey_PreservesRawFutureToken(t *testing.T) {
|
||||
got := futureCacheTokenKey("LUNA2")
|
||||
if got != "LUNA2" {
|
||||
t.Fatalf("expected LUNA2, got %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNormalizeFutureToken_NoOverride(t *testing.T) {
|
||||
got := normalizeFutureToken("PEPE")
|
||||
func TestFutureCacheTokenKey_NoOverride(t *testing.T) {
|
||||
got := futureCacheTokenKey("PEPE")
|
||||
if got != "PEPE" {
|
||||
t.Fatalf("expected PEPE, got %q", got)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user