Skip to content

fix:support-classic-accounts-trustlines #1746

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Dhanraj30
Copy link
Contributor

#1739

What

support for classic accounts and trustlines in snapshots.

Why

Support classic accounts and trustlines in snapshots. This change is being made to ensure that legacy account and trustline information is correctly included in the ledger snapshots. Classic accounts and trustlines were previously overlooked, which caused issues

Known limitations

N/A

@janewang
Copy link
Contributor

@Dhanraj30 Could you fix the coding formatting please

Comment on lines -292 to +296
LedgerKey::Trustline(k) => current.account_ids.contains(&k.account_id),
LedgerKey::Trustline(k) => {
current.account_ids.contains(&k.account_id) ||
current.account_ids.iter().any(|id| match &k.asset {
TrustLineAsset::CreditAlphanum4(a4) => a4.issuer == *id,
TrustLineAsset::CreditAlphanum12(a12) => a12.issuer == *id,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulling in every trustline for an asset unfortunately doesn't scale well with the current implementation of snapshots, which was why I left it out. If you pass in the address for a very popular asset, the file becomes huge and unusable.

For assets with much less trust lines though I can see this being very useful so maybe we should add it.

I think this use case will be better served by the following issue that hopefully we can implement in the near future:

Thoguhts @fnando ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog (Not Ready)
Development

Successfully merging this pull request may close these issues.

3 participants