-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Add Collection
module to fastx framework
#351
Conversation
3407698
to
ff1546d
Compare
Made a few changes:
|
b6dccc8
to
a7cbd8a
Compare
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 a question here: so we allow an owner to add an object to a collection, which is very cool. However I think that it is possible for the owner of the collection object to transfer the object owned to someone else?
// Remove the object from the collection. After the removal,
/// the object is still owned by the collection. Caller will need
/// to decide where to transfer it to.
What prevents the owner of the collection from moving the object in a collection, while it is still in the collection? Would it not be safer to wrap the object in the collection into a special object that denotes items in this collection, and unwrap it when it comes out of the collection, and forbid it moving while it is still in the collection?
Every function that can transfer an object requires Move ownership (e.g., a I do think the comment is potentially confusing, though... Every object remains owned by whoever owned it at the beginning of the transaction unless it is explicitly passed to a |
ff1546d
to
5407a7e
Compare
Addressed feedback:
|
5407a7e
to
fe81918
Compare
* Add skeleton for new epoch endpoint * add method to extract and verify public key from request similar to proposer
* Add skeleton for new epoch endpoint * add method to extract and verify public key from request similar to proposer
This PR adds
Collection
, a heterogeneous object collection that owns a list of objects with potentially different types. This is a modules that demonstrates how object ownership can be used.There are some other issues preventing us from exposing the
add
function as entry points: #348