Hi Andreas,

so .. shall i use:

void onCoinsReceived(Wallet 
<https://bitcoinj.github.io/javadoc/0.14.5/org/bitcoinj/wallet/Wallet.html> 
wallet,
                     Transaction 
<https://bitcoinj.github.io/javadoc/0.14.5/org/bitcoinj/core/Transaction.html> 
tx,
                     Coin 
<https://bitcoinj.github.io/javadoc/0.14.5/org/bitcoinj/core/Coin.html> 
prevBalance,
                     Coin 
<https://bitcoinj.github.io/javadoc/0.14.5/org/bitcoinj/core/Coin.html> 
newBalance)

which should process the 'block' which is downloaded from the chain which keeps 
the transaction which was confirmed in the time of the server beeing shut down ?






Am Montag, 28. August 2017 08:45:17 UTC+2 schrieb Andreas Schildbach:
>
> 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 bitcoinj+u...@googlegroups.com <javascript:> 
> > <mailto:bitcoinj+u...@googlegroups.com <javascript:>>. 
> > 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 bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to