-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Offer expiration field has no effect #141
Comments
This does appear to be a bug. A crossing offer took an offer that expired prior to the time the parent ledger closed. I will investigate. |
Are you able to reproduce it with the current rippled servers? I was unable, the second crossing offer deleted the first (since it was expired), but didn't take it, and in fact the second one has been added to the order book. |
Thank you for looking into it. The bug still exists although perhaps in a modified way. However, the expired offer still shows in the book_offers results (other unfunded offers don't) and, more importantly, in the results of ripple_path_find (based on the price/rate returned). Using a payment transaction I was able to take from an expired offer. The payment transaction did remove the offer instead of shrinking it but it shouldn't have let anything be taken from it. For example (again with GDW and XRP): The second payment tx is the interesting one, it was tx |
This is a bug. A payment can take from an expired offer. The offer will always be removed, but it can be partially taken from. |
I think you erroneously removed the 'continue' statement in this commit: 5a9416f |
Guilty as charged. Fixed in 46861fa |
Workaround for windows min and max macros with std::min and std::max
Perhaps I'm misreading the wiki documentation for offer_create or this feature is just not implemented yet (which if either is true implies the wiki should be updated). The following assumes that the "Expiration" field has the same format as other Ripple times and is an absolute time; e.g. that
"Expiration": 428679695
represents an expiration time ofThu 1 Aug 2013 13:41:35 UTC
. (i.e. the result of date -u -rexpr 428679695 + 946684800
as per the wiki documentation on Ripple time formats)Transaction
C942A879310087A5461490D079A35E50D16E7405AC9F381AD96CB580CE12FEEA
added a offer like so:Aug 1 13:40:40 UTC Offer dchapes seq=440 will take 0.01 GDW/Goodwill for 1 XRP @ 0.01 (expires 2013-08-01 13:41:35 +0000 UTC)
After the supposed expiration time the offer still appeared in the order book and was taken by transaction
BA82C45DBC615E83EE97FB85F76BC88B431149A630786460CA0BA1F67F2F377D
:Aug 1 20:08:30 UTC Offer xxxx seq=177 will take 1 XRP for 0.01 GDW/Goodwill @ 100 : Flags=0x00080000
The relevant parts of the transactions are:
and
The text was updated successfully, but these errors were encountered: