Pending transactions get re-broadcasted to you by your peers until they're confirmed. That means after a server restart you only need to connect to peers again.
If meanwhile the payment gets included into the blockchain, you should still receive it once in a block. You only need to make sure that your server doesn't forget transactions received in a block. Or if it does, at least keep an accurate block height so next time you request the last (missed) blocks again. On 08/27/2017 11:09 PM, 'Martin Bauer' via bitcoinj wrote: > Hi, > > i have some questions belonging to problems after having made lots of > transactions with this wallet. > > I would like to implement a webstore - everything works fine - i receive > transaction by > "addTransactionConfidenceEventListener(TransactionConfidenceEventListener)". > In case of a server breakdown - the server can not see the incomming > transaction. In my tests - after 'not' receiving some coins without to > be online the system did not fire > events for the missed transactions after it was online again. How can i > 'notice' that a customer has paid the money to his wallet-address? > > I read the documentation - and i found: > > wallet().getTransactionsByTime() > wallet().getRecentTransaction(....) > Wallet.reset() (-> did not work !!) > > I tried to use them - and it solves (theoretically) my problem, BUT i > have some questions/concerns/issues: > > 1) in case of using getRecentTransaction - what is the best/correct > number of "number of transaction"? Integer.Max ? An number > calculated by (average_transactions_per_hour * time_of_server_offline * > failure_save_factor). ? Any hints? Ideas ? > Another idea is to start with e.g. 500. And if the first 500 did not > have a allready processed entry - get 1000... and so on .... util a well > known trnasaction has been reached. > > I just need the (unkown) last transactions until the last processed > transaction is in the list. (I store the processed transaction in my > database) > > 2) In case of getTransactionsByTime() - imagine having a big big > webstore for a long time with really many many many many transactions. > How big will the list be? All transactions from beginning of the life of > the wallet? Might be very very many entries so will i get a > "outOfMemory" Problem? > Would it be a good idea to change the wallet after some time and start > with a 'brand new' wallet to get rid of the old processed transactions? > > > Thank you in helping to anser my problems > > -- > You received this message because you are subscribed to the Google > Groups "bitcoinj" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
