Hi:

I don't fully understand what updatedAt is supposed to represent.

I've read the source code and read the comment here
https://github.com/bitcoinj/bitcoinj/blob/d953ced801ef425de8ac4fe14447255bc5e383f8/core/src/main/java/org/bitcoinj/core/Transaction.java#L132-L136.

The variable is set or modified in these cases:
- Tx creation by user - wallet.commit() -> tx.setUpdateTime()
- Tx broadcasted by the network - wallet.commit() -> tx.setUpdateTime()
- Tx included in a block (but only on some specific scenarios) -
tx.setBlockAppearance()
  - When bitcoinj was not aware of the tx before it received the block.
  - When block time is before creation/broadcast time.
  - When there was a reorg and the tx is now included in a mainchain
block with a timestamp that is previous to updatedAt value.

It makes the impression the field is supposed to represent the first
time the wallet was aware of the tx existence. I am not sure that is
the case because the code does not do exactly that.

The subject was partly discussed on:
https://groups.google.com/forum/#!msg/bitcoinj/05TJbxAwKXs/eeCJeuvJDwAJ
and
https://github.com/bitcoinj/bitcoinj/issues/1507

So...
What updatedAt is supposed to represent exactly?

-- 
Oscar Guindzberg

-- 
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