Author

Topic: Electrum Protocol: Transaction Confirmations (Read 230 times)

HCP
legendary
Activity: 2086
Merit: 4363
November 05, 2017, 01:45:51 AM
#4
"Confirmations" are simply the number of blocks that have been mined since the transaction was put into a block... the block it is put in, counts as 1 confirmation. The formula is:

Number of Confirmations = (current blockchain height - block height it was confirmed in) + 1

For example, your transaction is included in block# 492400... it now has 1 confirmation. 10 blocks later, at block# 492410, it will now have 11 confirmations... 10 blocks after that, at block# 492420, it will have 21 confirmations.

So... if you transaction was in block# 492400... and the current blockheight is 492502... # confirmations = (492502 - 492400) + 1 = 103 confirmations.
newbie
Activity: 51
Merit: 0
November 05, 2017, 12:56:56 AM
#3
Does the "transaction.get" method give you the block# or height that it was confirmed in within the hex data? If so, then you could just calculate the difference between that number and the current blockchain height and that is your number of confirmations.

NOTE: I see the Address.get_history method returns block heights for the transactions associated with an address... maybe that's an option?
Explain more please,
I do not know how confirmations are counted thanks for giving me an idea Smiley
HCP
legendary
Activity: 2086
Merit: 4363
November 05, 2017, 12:30:46 AM
#2
Does the "transaction.get" method give you the block# or height that it was confirmed in within the hex data? If so, then you could just calculate the difference between that number and the current blockchain height and that is your number of confirmations.

NOTE: I see the Address.get_history method returns block heights for the transactions associated with an address... maybe that's an option?
newbie
Activity: 51
Merit: 0
November 04, 2017, 09:34:11 PM
#1
Looking for a method to get transaction confirmations,
Apparently there's nothing to do that in the protocol documentation

Docs: http://docs.electrum.org/en/latest/protocol.html
Jump to: