-
Notifications
You must be signed in to change notification settings - Fork 15
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
Unify generics code #297
Unify generics code #297
Conversation
…rator interface in generic.go file in core package. Created genericIterator.go file in util package. Added GenericIterator type implemented Iterator interface in genericIterator.go file in util package. Implemented CurrentData, HasNext and Next methods of GenericIterator type in util package. Created NewGenericIterator function in util package.
…ype using util.GenericIterator in cipher.go file in skycoin package. Created NewSkycoinAddressIterator function in cipher.go file in skycoin package. Reimplemented all SkycoinAddressIterator implementation.
…to genericIterator.
…queda_t290_Generic # Conflicts: # src/models/modelWallets.go
…s methods in util package.
@stdevHsequeda good , will take a look into this shortly |
|
||
// Iterator defines a generic iterator. | ||
type Iterator interface { | ||
CurrentData(interface{}) error |
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.
This needs be changed
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.
To Value() interface?
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.
yep
Returns if call to ScanUnspentOutputs fails
…elWallets.loadModel ... ... rather than halting the cycle
…ve_outputs_bug Fixes fibercrypto#302 - Solve outputs bug
I'm starting to hesitate about whether moving forward with this is a good idea |
I am not satisfied with the approaches I've seen so far ... Let's keep things the way they are now and reopen this should situation change at some point later |
Fixes #290
Changes:
-Added Iterator interface.
-Implementing Iterator interface in util packege with GenericIterator type.
-Replaced all old iterators implementation for GenericIterator.
-Added test and comments for GenericIterator type.
Does this change need to mentioned in CHANGELOG.md?
no
Requires testing
Requires testing
no
Comments about testing , should you have some