-
Notifications
You must be signed in to change notification settings - Fork 100
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
Integrate NeoFS into oracle module #518
Conversation
need to sync with latest neo. |
Conflicts |
Tested? |
return obj.Payload.ToByteArray(); | ||
} | ||
|
||
private static Task<byte[]> GetRangeAsync(Client client, Address addr, string[] ps, CancellationToken cancellation) |
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.
private static Task<byte[]> GetRangeAsync(Client client, Address addr, string[] ps, CancellationToken cancellation) | |
private static async Task<byte[]> GetRangeAsync(Client client, Address addr, string[] ps, CancellationToken cancellation) |
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.
We don't need it be async here.
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.
What's the difference?
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.
Regardless of whether it is an async
method, our purpose is to return a Task
. Now since it can return a Task
directly, it is not necessary as an async
method. Because async
methods have additional overhead (although very low).
Tested OK. case:
result:
|
Header:
NeoFS result hex to string:
|
@shargon @erikzhang Merge? |
Strip '//', see neo-project/neo-modules#518.
* Integrate NeoFS into oracle module * Rename * Fix bug * Fix bug * Fix UT * Clean using * Optimize * Reorder using * change to base64 * change to random * Fix bug * Rename * change to single node * Remove AttachWallet * Rename * Remove empty line * Update OracleNeoFSProtocol.cs * Fix bug * fix bug * neofs request timeout * url check * Update OracleNeoFSProtocol.cs * Update config.json * apply timeout * Fix memory leak * async * update neofs api * remove neofs request host check * Fix bug of URL encode * Fix format * add default salt, format * Return JSON string of ObjectHeader * Optimize Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Erik Zhang <erik@neo.org> Co-authored-by: ZhangTao1596 <zhangtao@ngd.neo.org>
No description provided.