Bitcoin Forum
December 05, 2016, 08:28:09 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Question about bitcoin confirmations  (Read 591 times)
NonProphet
Newbie
*
Offline Offline

Activity: 15


View Profile
July 21, 2011, 07:47:07 PM
 #1

Hey everyone, I've got another (hopefully last) question about bitcoin.

I'm working on a web app that has deposit/withdraw functionality with bitcoin.  I got deposits going through and everything looks to be going smoothly.  But I noticed a bug and I'm not sure why it is happening.

Every user has their own account that they deposit to, and I have a cron script that runs every 5 minutes to check pending deposits.  I use getReceivedByAccount('user account name', 5) to make sure that there are 5 confirmations.  After 1 confirmation (first pass of the cron script), the deposit went through.  I'm thinking it has something to do with the fact that this is the second deposit in a row for the same amount to/from the same addresses.  The API call returns the amount received and I compare that to the pending deposit amount to see if it is a match.

Any thoughts on why it went through after 1 confirmation like that?
1480926489
Hero Member
*
Offline Offline

Posts: 1480926489

View Profile Personal Message (Offline)

Ignore
1480926489
Reply with quote  #2

1480926489
Report to moderator
1480926489
Hero Member
*
Offline Offline

Posts: 1480926489

View Profile Personal Message (Offline)

Ignore
1480926489
Reply with quote  #2

1480926489
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480926489
Hero Member
*
Offline Offline

Posts: 1480926489

View Profile Personal Message (Offline)

Ignore
1480926489
Reply with quote  #2

1480926489
Report to moderator
NonProphet
Newbie
*
Offline Offline

Activity: 15


View Profile
July 22, 2011, 06:11:57 PM
 #2

Bump...

I'm still stumped on this.  Does getReceivedByAccount store the total currently in the address or the total received?  If I deposit 2 deposits of 0.5 BTC, but I move the .5 BTC to another wallet after it goes through, should it return 0.5BTC or 1 BTC, after the first one goes through but waiting on the second deposit.

Any thoughts?
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!