Bitcoin Forum
June 21, 2024, 04:20:21 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question about bitcoin confirmations  (Read 723 times)
NonProphet (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


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?
NonProphet (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!