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

Balance RPCs return empty balance entries #257

Closed
dexX7 opened this Issue Oct 9, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@dexX7
Member

dexX7 commented Oct 9, 2015

When using "omni_getallbalancesforid" or "omni_getallbalancesforaddress", then there may be entries with zero balances. Those are entries, which previously had some balance, but now have none.

I think the entries should either be filtered out, or removed (but not on the RPC layer).

Empty balance entries are not persisted, so this only affects the runtime state.

Related: OmniLayer/OmniJ#116 (comment)

@zathras-crypto

This comment has been minimized.

Show comment
Hide comment
@zathras-crypto

zathras-crypto Oct 12, 2015

Those are entries, which previously had some balance, but now have none.

Yep, since we loop the tally and an empty address persists during runtime - but that begs the bigger question: when we update_tally_map and the end result for an address is all zeros across all tally types, should the address be removed from the tally map?

...should either be filtered out, or removed (but not on the RPC layer).

I'm not sure what you mean by "not on the RPC layer" mate, sorry! I would say:

  • if we want to filter tally objects it's the RPC layer we should be doing it.
  • if we want to remove tally objects it's the tally itself we should be doing it.

zathras-crypto commented Oct 12, 2015

Those are entries, which previously had some balance, but now have none.

Yep, since we loop the tally and an empty address persists during runtime - but that begs the bigger question: when we update_tally_map and the end result for an address is all zeros across all tally types, should the address be removed from the tally map?

...should either be filtered out, or removed (but not on the RPC layer).

I'm not sure what you mean by "not on the RPC layer" mate, sorry! I would say:

  • if we want to filter tally objects it's the RPC layer we should be doing it.
  • if we want to remove tally objects it's the tally itself we should be doing it.
@dexX7

This comment has been minimized.

Show comment
Hide comment
@dexX7

dexX7 Oct 12, 2015

Member
  • if we want to filter tally objects it's the RPC layer we should be doing it.
  • if we want to remove tally objects it's the tally itself we should be doing it.

This is what I was referring to.

Let me rephrase: it probably would be not a good, if we start to remove/delete tally entries directly in the RPCs. Filtering can be done on the RPC layer though. :)

I'd say: let's filter them for now.

Member

dexX7 commented Oct 12, 2015

  • if we want to filter tally objects it's the RPC layer we should be doing it.
  • if we want to remove tally objects it's the tally itself we should be doing it.

This is what I was referring to.

Let me rephrase: it probably would be not a good, if we start to remove/delete tally entries directly in the RPCs. Filtering can be done on the RPC layer though. :)

I'd say: let's filter them for now.

@zathras-crypto

This comment has been minimized.

Show comment
Hide comment
@zathras-crypto

zathras-crypto Oct 13, 2015

Would this suffice? #262

zathras-crypto commented Oct 13, 2015

Would this suffice? #262

@dexX7

This comment has been minimized.

Show comment
Hide comment
@dexX7

dexX7 Oct 14, 2015

Member

Resolved via #262. :)

Member

dexX7 commented Oct 14, 2015

Resolved via #262. :)

@dexX7 dexX7 closed this Oct 14, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment