Code Monkey home page Code Monkey logo

Comments (10)

moneroexamples avatar moneroexamples commented on May 22, 2024

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.

from onion-monero-blockchain-explorer.

moneroexamples avatar moneroexamples commented on May 22, 2024

Just marged it to master.
#11

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.

from onion-monero-blockchain-explorer.

Gingeropolous avatar Gingeropolous commented on May 22, 2024

2016-11-13 08:51:43

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
etc etc

from onion-monero-blockchain-explorer.

Gingeropolous avatar Gingeropolous commented on May 22, 2024

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.

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.

from onion-monero-blockchain-explorer.

moneroexamples avatar moneroexamples commented on May 22, 2024

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.

from onion-monero-blockchain-explorer.

Gingeropolous avatar Gingeropolous commented on May 22, 2024

hrm... though there are a lot of changes to lmdb-cpp since I compiled last apparently

from onion-monero-blockchain-explorer.

moneroexamples avatar moneroexamples commented on May 22, 2024

The datetime search has been extended and its ready for testing.

  • 2015-04-15 12:02:33 searches for block of this timestamp or first next one.
  • 2015-04-15 12:02 searches for all txs made in the given minute
  • 2015-04-15 12 searches for all txs made in the given hour
  • 2015-04-15 searches all txs made in that day (only up to 500 txs are displayed though).

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.

from onion-monero-blockchain-explorer.

Gingeropolous avatar Gingeropolous commented on May 22, 2024

sweeeeeet.

from onion-monero-blockchain-explorer.

moneroexamples avatar moneroexamples commented on May 22, 2024

No problem. Let me know if there are some problems with it or something else is required.

from onion-monero-blockchain-explorer.

moneroexamples avatar moneroexamples commented on May 22, 2024

If there are no further question or issues, I will close this issue. Please feel free to re-open if needed.

from onion-monero-blockchain-explorer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.