Author

Topic: new vs updated transactions (source code question) (Read 548 times)

legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
I am pretty sure that tx "updates" will be required whenever a blockchain re-org occurs (which is not uncommon).

Understand that if two new "solved" blocks are broadcast at around the same time then your client will initially decide to use the first block it sees, however, if the next block you see connects to the "other" solution then all the tx's in the block that was first accepted now have to be considered as invalid. It is likely that many of those same tx's will be now included in the new blocks (thus information such as the "hashBlock" would need to be updated).
newbie
Activity: 2
Merit: 0
I'm looking at the bitcoind source, specifically CWallet::AddToWallet in wallet.cpp.

I see a reference to new or updated transactions: fInsertedNew or fUpdated, etc.

New transactions make sense, but under what circumstances is a transaction "updated"?

Thanks,
Dave

PS. I'm new here but have been experimenting with bitcoin on and off for a couple years.
Jump to: