1. There is a second listener called ReorganizeListener. Orphaned blocks
will be in "oldBlocks".

2. Have a look at the "Block" class. The timestamp is UTC, but be aware
it can drift quite a bit (up to 2 hours) according to consensus.


On 11/09/2017 05:51 AM, Nana wrote:
> Hi Andreas,
> 
> A few more things then i promise i wont bother again
> 
> 1. how does one know if a new block is marked as "orphaned"?
> 2. through bitcoinj, can you get all block details, well height and then
> the timestamp? are these timestamps all UTC timezone? or the timezone of
> who finds the block?
> 
> Great thanks
> 
> Regards,
> Neil
> 
> 
> On Wed, Nov 8, 2017 at 7:18 PM, Nana <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     great thanks appreciate it!
> 
> 
>     On Wed, Nov 8, 2017 at 6:46 PM, Andreas Schildbach
>     <[email protected] <mailto:[email protected]>> wrote:
> 
>         Have a look at NewBestBlockListener and the
>         org.bitcoinj.core.AbstractBlockChain.addNewBestBlockListener()
>         method.
>         If you prefer an example, the BuildCheckpoints tool (in the tools
>         subproject) has some code that does this.
> 
> 
>         On 11/07/2017 11:24 AM, [email protected]
>         <mailto:[email protected]> wrote:
>         >
>         > Hi,
>         >
>         > Am looking on how to get notified of the arrival of a new
>         block. Can this
>         > be done? will it contain the block height info and the relay
>         as well as
>         > timestamp?
>         >
>         > thanks
>         >
> 
> 
>         --
>         You received this message because you are subscribed to a topic
>         in the Google Groups "bitcoinj" group.
>         To unsubscribe from this topic, visit
>         https://groups.google.com/d/topic/bitcoinj/Y4Z-v782D04/unsubscribe
>         <https://groups.google.com/d/topic/bitcoinj/Y4Z-v782D04/unsubscribe>.
>         To unsubscribe from this group and all its topics, send an email
>         to [email protected]
>         <mailto:bitcoinj%[email protected]>.
>         For more options, visit https://groups.google.com/d/optout
>         <https://groups.google.com/d/optout>.
> 
> 
> 
> 
>     -- 
>     massacre
> 
> 
> 
> 
> -- 
> massacre
> 
> -- 
> 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.

Reply via email to