Bitcoin Forum
July 10, 2024, 01:20:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: new vs updated transactions (source code question)  (Read 537 times)
IcedChai (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 18, 2012, 03:47:49 AM
 #1

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.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1081


Ian Knowles - CIYAM Lead Developer


View Profile WWW
November 18, 2012, 03:55:45 AM
 #2

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

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!