-
Notifications
You must be signed in to change notification settings - Fork 499
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
services/horizon: Batch liquidity pool updates/removals #3944
Conversation
387ae24
to
1b0df11
Compare
1b0df11
to
d5fb5c3
Compare
lp := p.ledgerEntryToRow(change.Pre) | ||
lp.Deleted = true | ||
lp.LastModifiedLedger = p.sequence | ||
lps = append(lps, lp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should create RemoveLiquidityPools
method and hide implementation of deleted objects (Deleted
flag) from the caller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you be more specific? By implementation of deleted objects you mean factoring out the creation of a deleted liquidity pool value?
The deleted field is public anyhow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By implementation of deleted objects you mean factoring out the creation of a deleted liquidity pool value?
Exactly. If we ever change the implementation of how objects are removed (idk: we also add a deleted time or we will just remove the row) we'll have to change every instance of deletion upstream and fix a bunch of tests. I agree that Deleted
field is public. We should probably also change this (not in this PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have given it a try, but I don't think it makes sense to attempt that sort of encapsulation without removing the Deleted field (which I think is out of the context of this PR).
Can we handle this separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Fixes #3931