Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix collision on multiread #1100

Merged
merged 2 commits into from
Feb 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/solana/chainreader/chain_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ func (s *ContractReaderService) addMultiAccountReadToCodec(namespace string, rea

// multi read defs don't have a generic name as they are accessed from the parent read which does have a generic name.
// generic name is used everywhere, so add a prefix to avoid potential collision with generic names of other reads.
genericName := "multiread-" + mr.ChainSpecificName
genericName := fmt.Sprintf("multiread-%v-%v", readDefinition.ChainSpecificName, mr.ChainSpecificName)
if err = s.addReadToCodec(s.parsed, namespace, genericName, idl, inputIDLDef, accountIDLDef, mr); err != nil {
return nil, fmt.Errorf("failed to add read to multi read %q: %w", mr.ChainSpecificName, err)
}
Expand Down
Loading