Post
Topic
Board Development & Technical Discussion
Re: As a developer, what's the best way to accept BTC without using third-parties
by
contactlight
on 17/11/2014, 21:41:41 UTC
I dont think you need to worry about peers, blocks, unspent outputs, etc.

Just generate a key/address pair , give the public address to your customer.
What's wrong with that?

I need to be able to programmatically check for the incoming transactions to that address and sweep all the unspent outputs. I am already planning on generating a key/address pair and give the public address to the customer.

I just need to have a reliable way to be notified of incoming transactions to that address. My current Bitcoinj setup notifies me and sweeps the transactions when notified. However, this only happens if my service is up and running when the user makes the transaction. If the service is down, the transactions go unnoticed and I don't get notified during the blockchain sync process.

I was using BlockChain and PostgresFullPrunedBlockStore, and I noticed that it wasn't populating the unspent outputs table. This was probably due to me using BlockChain instead of FullPrunedBlockChain. I refactored that into my code and now I am syncing again. Let's see what happens with that.