-
Notifications
You must be signed in to change notification settings - Fork 119
changed c return value of update price to indicate aggregation #190
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
Merged
guibescos
merged 5 commits into
twap-tracker-production
from
propagate-aggregate-update
Jul 19, 2022
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
82a62e4
changed c return value of update price to indicate aggregation
majabbour 58ed3f7
forgot to add bindings
majabbour a05416a
removed the need for casting
majabbour 8db76ac
fixed update_no_fail
majabbour 322a582
removed unnecessary docker packages
majabbour File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #pragma once | ||
|
|
||
| #define static_assert _Static_assert | ||
|
|
||
| typedef signed char int8_t; | ||
| typedef unsigned char uint8_t; | ||
| typedef signed short int16_t; | ||
| typedef unsigned short uint16_t; | ||
| typedef signed int int32_t; | ||
| typedef unsigned int uint32_t; | ||
| typedef signed long int int64_t; | ||
| typedef unsigned long int uint64_t; | ||
|
|
||
| #include "../../c/src/oracle/oracle.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,19 @@ | ||
| //this is auto generated by build_bpf.sh | ||
| mod c_oracle_header; | ||
|
|
||
| #[link(name = "cpyth")] | ||
| extern "C" { | ||
| fn c_entrypoint(input: *mut u8) -> u64; | ||
| } | ||
|
|
||
| #[no_mangle] | ||
| pub extern "C" fn entrypoint(input: *mut u8) -> u64 { | ||
| unsafe{ | ||
| return c_entrypoint(input); | ||
| let c_ret_val = unsafe{c_entrypoint(input)}; | ||
| if c_ret_val == c_oracle_header::SUCCESSFULLY_UPDATED_AGGREGATE{ | ||
| return 0; | ||
| } else { | ||
| return c_ret_val; | ||
| } | ||
|
|
||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.