-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix(orderbook): age field is set in proper way #1851
Conversation
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.
Great work! just couple suggestions
Can you pull |
updated, squashed, rebased |
8f58fb8
to
c3478a5
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'd like @shamardy to review this too.
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.
Thank you for the fix! Only one important comment from me.
mm2src/mm2_main/src/lp_ordermatch.rs
Outdated
($created_at: expr) => { | ||
now_sec() | ||
.checked_sub($created_at) | ||
.ok_or_else(|| warn!("now - created_at: ({} - {}) caused an u64 underflow.", $base, $sub)) |
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.
u64 starts with a vowel sound
.ok_or_else(|| warn!("now - created_at: ({} - {}) caused an u64 underflow.", $base, $sub)) | |
.ok_or_else(|| warn!("now - created_at: ({} - {}) caused a u64 underflow.", $base, $sub)) |
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.
done
mm2src/mm2_main/src/lp_ordermatch.rs
Outdated
.ok_or_else(|| warn!("now - created_at: ({} - {}) caused an u64 underflow.", $base, $sub)) | ||
.unwrap_or_default() | ||
.try_into() | ||
.expect("Expected default u64 converted to i64 without a problem") |
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.
.expect("Expected default u64 converted to i64 without a problem") | |
.expect("Expected default u64 to be converted to i64 without a problem") |
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.
done
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.
LGTM
--
non-blocker:
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.
LGTM!
b8b298f
to
6b44667
Compare
When orderbook is requested the age field now returns the right age.
When orderbook is requested the age is often different and the same for each order. This behavior has been solved