1
I'm implementing a Bitcoin payment system that generates bitcoin address for each user to deposit.
I use BitcoinJ to generate user's addresses and rawblock API from Blockchain.com to get every single block to check if my addresses are in any transaction output, then my system increases the user's internal balance.
I save scanned block height in the database and send a request for a new block every 10 minutes.
Is that solution correct? (I need testnet so I cannot use their Wallet Service)
Thank you.
I've been thinking Blockchain.com is a trusted service and we can rely on them and I don't want to maintain a node on my server.
For the (2.), I fetch only blocks that have at least n confirmations and fetch only 1 block (1 time) at any height. I haven't known any other mechanism to handle blockchain reorganization.
Do you think electrum.org or a centralized service is a better choice in my case? Thank you.
2Blockchain[dot]com is definitely not a trusted service. Really there are not any trusted services in bitcoin. WRT electrum, it's a bit better but you will lose all your privacy in the process. I still believe something like BTCpay is your best bet. – arubi – 2018-12-31T16:55:37.417