Git Product home page Git Product logo

Comments (11)

hookbot avatar hookbot commented on August 14, 2024 1

Okay, I will upvote this issue. To calculate the "Confirmations", you have to visit https://blockchair.com/bitcoin-cash and quickly remember the highest block height at the top, and then read the "Included in block" number for the transaction yu are wondering about and subtract that number from that highest block height number, and then + 1, and that gives you the true "Confirmations" for that transaction you're wondering about.

But yes, it's getting very annoying from having to keep doing that for all the transactions. It seems like it'd be much easier for the website to perform these calculations by itself than to have all the humans to keep doing those calculations in their head all the time.

Thank you dbeckwith for your suggestion.

from blockchair.support.

dbeckwith avatar dbeckwith commented on August 14, 2024

Ah okay, I didn't realize that's how it was calculated. But yeah, it would be nice to just show that. Lots of other block explorer websites show you the actual number of confirmations.

from blockchair.support.

hookbot avatar hookbot commented on August 14, 2024

You are correct. It's much easier for a computer to compute the Confirmations than for us humans. I'm fairly confident that all other block explorer websites just show "0 Confirmations" for transactions that don't belong to any block. Otherwise they just show how many Confirmations. Even blockchain.info shows up to 100 confirmations before it's hidden from their interface.

from blockchair.support.

Har01d avatar Har01d commented on August 14, 2024

Thanks for the request and the comments, we’re working on it!

from blockchair.support.

Har01d avatar Har01d commented on August 14, 2024

Now the number of confirmations is shown under the General Info tab:
confirmations

Once again, thanks for suggestions!

from blockchair.support.

dbeckwith avatar dbeckwith commented on August 14, 2024

Cool, looks good!

from blockchair.support.

shideneyu avatar shideneyu commented on August 14, 2024

What about the API ? There is no 'Block height' results to compute, hence 2 requests to be made.

from blockchair.support.

Har01d avatar Har01d commented on August 14, 2024

Hey @shideneyu,

There’s context.state in each API response containing the number of the latest block.

So, for example, you request http://api.blockchair.com/bitcoin/dashboards/transaction/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b

And then you subtract the block number from the state value (context.state - data. 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b.transaction.block_id) — that would give you the number of confirmations.

from blockchair.support.

shideneyu avatar shideneyu commented on August 14, 2024

Thank you very much !

from blockchair.support.

avamr avatar avamr commented on August 14, 2024

To know the number of confirmations for a transaction, it's actually
(context.state - transaction.block_id + 1)

from blockchair.support.

Har01d avatar Har01d commented on August 14, 2024

@avamr, nice catch, it is indeed +1.

from blockchair.support.

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.