BitcoinJ instance shutting down before transaction confirmation

0 votes

I am currently working on developing an application in blockchain that accepts BTC as payment. But there seeems to be a problem. When I am sending btc to the wallet, it says transaction received, but it has no confirmation.

Now, I am creating future listener to event for 3rd confirmation of the transaction. What will happen if the app get down before future listener executed? It is not eventing after i restart the app. What can i do at this point?

Aug 31, 2018 in Blockchain by sabby
• 4,370 points
51 views

1 answer to this question.

0 votes

Instead of attaching to an individual transaction you could attach a WalletChangeEventListener (docs). It is called, among other things, when a new block is found and a confirmation is added to a transaction. If registered before the event loop is started it should get called on each block even during the sync with the rest of the network, mimicking being online during the confirmation period.

answered Aug 31, 2018 by Christine
• 15,810 points

Related Questions In Blockchain

+1 vote
1 answer

How does a miner get to know that a transaction is verified by all the nodes?

Contrary to the popular belief, it is ...READ MORE

answered Mar 26, 2018 in Blockchain by Johnathon
• 9,090 points
99 views
+1 vote
1 answer

Transaction using Blockchain wallet APi

Each transaction requires a fee to be ...READ MORE

answered Jun 19, 2018 in Blockchain by Perry
• 17,090 points
67 views
0 votes
0 answers

What happens to the ethereum mempool transaction of uncle and fork nodes

I understand that in Bitcoin network when ...READ MORE

Apr 7, 2018 in Blockchain by Christine
• 15,810 points
126 views
+1 vote
4 answers
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,340 points
101 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,810 points
187 views
0 votes
1 answer
0 votes
1 answer

Transaction cost variations in one contract vs. multiple contracts

You are free to choose whatever works ...READ MORE

answered Apr 19, 2018 in Blockchain by Christine
• 15,810 points
41 views
0 votes
1 answer

Understanding Hyperledger transaction verification

 HL v0.x, the consensus process 'validates' transactions ...READ MORE

answered Jun 7, 2018 in Blockchain by Christine
• 15,810 points
225 views