-
Notifications
You must be signed in to change notification settings - Fork 267
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
Feature request - look up by date #5
Comments
Good idea. I will look into it. I already have code for estimation of block height from a date, so maybe can use this. Could also add the stamp to the custom lmdb database, for super fast and exact search of block. |
Just marged it to master. The supported datetime format is 2016-11-13 08:51:43 . If the block with exact timestamp does not exist, the first boock with higher timestamp is returned. For this to work, the custom lmdb database must be up to date, as the timestamps are taken from it. In Monero blockchain, you cant search blocks based on timestamps. Also UTC timezone were fixed, so now the dates and times shown are UTC, unlike before. Hinnant library requires curl, so you mean need to install it, sudo apt install libcurl4-openssl-dev first. |
i'll probably find out once I compile and test it, but can you input substrings of the above? e.g., 2016-11-13 08:51:43 would get a specific block, but 2016-11-13 08:51 would return any block found in that minute and 2016-11-13 08 would return any block found in that hour, or blocks found starting at that hour. 2016-11-13 would return blocks found starting that day |
OOOOH im an idiot. By up to date, you mean recompile. Not simply that the database on the server is currently up to date with the blockchain. |
Nope, just having current blocks. No need to recompile or recreate it. Yes, was thinking about the "no-full" timestamps. Its duable, but need time to implement that. |
hrm... though there are a lot of changes to lmdb-cpp since I compiled last apparently |
The datetime search has been extended and its ready for testing.
SInce the custom lmdb database is used for the searches (its not possible to search for this efficiently in monero blockchain), lmdb must be running and keeping its records up to date with blockchain. |
sweeeeeet. |
No problem. Let me know if there are some problems with it or something else is required. |
If there are no further question or issues, I will close this issue. Please feel free to re-open if needed. |
Can you pretty please add a feature to look up a block by the timestamp?
Timestamp [UCT]: 2016-11-13 08:51:43
I dunno which format would be best, but the data seems to be in there.
The text was updated successfully, but these errors were encountered: