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

Replace global balance arrays with std::map #67

Conversation

dexX7
Copy link

@dexX7 dexX7 commented May 15, 2015

This is a resubmission of mastercoin-MSC#258.

  1. Doesn't cover full range of potential properties, can result in out-of-bounds violation
  2. No need to reserve 100000 elements each
  3. [] operator reads an element at position, if key exists, or inserts an element, if not
  4. Balances are int64_t

@@ -61,11 +61,6 @@
#define DECORATION_SIZE 64
#define NUM_ITEMS 6 // 3 - number of recent transactions to display

extern uint64_t global_balance_money_maineco[100000];
Copy link
Author

Choose a reason for hiding this comment

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

No need to extern the variables here, because they are already already provided via mastercore.h.

1. Doesn't cover full range of potential properties, can result in out-of-bounds violation
2. No need to reserve 100000 elements each
3. [] operator reads an element at position, if key exists, or inserts an element, if not
4. Balances are int64_t
@dexX7 dexX7 force-pushed the oc-0.10-ui-balance-arrays-to-map branch from 5d272e8 to 25b6cb4 Compare May 15, 2015 21:55
@zathras-crypto
Copy link
Owner

Agreed, thanks dude :)

zathras-crypto added a commit that referenced this pull request May 17, 2015
Replace global balance arrays with std::map
@zathras-crypto zathras-crypto merged commit 7d52786 into zathras-crypto:0.0.10-Z-UI May 17, 2015
zathras-crypto pushed a commit that referenced this pull request Jun 3, 2015
3d647f5 Update MetaDEx network/transaction fields (dexX7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants