Bitcoin Forum
June 06, 2024, 01:11:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: what dose CTxWitness use for?  (Read 829 times)
lovecodelc (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 2


View Profile
October 08, 2016, 02:42:45 AM
 #1

Bitcoin Core code defines class data type "CTransaction", i see it has a data member:CTxWitness, what dose CTxWitness use for?
and it has a data member:const uint256 hash /** Memory only. */, it means if a transaction in mempool, it has this data member:hash?
or if on disk, it has no data member:hash?

thank you.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3416
Merit: 6675


Just writing some code


View Profile WWW
October 08, 2016, 03:49:42 AM
 #2

CTxWitness is for segwit. Specifically it is for the witnesses included in the segwit serialization.

and it has a data member:const uint256 hash /** Memory only. */, it means if a transaction in mempool, it has this data member:hash?
or if on disk, it has no data member:hash?
It means that that hash is kept in the memory and not on disk.

lovecodelc (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 2


View Profile
October 08, 2016, 06:18:18 AM
 #3

Thank you.

CTxWitness is for segwit. Specifically it is for the witnesses included in the segwit serialization.

and it has a data member:const uint256 hash /** Memory only. */, it means if a transaction in mempool, it has this data member:hash?
or if on disk, it has no data member:hash?
It means that that hash is kept in the memory and not on disk.
IS1982
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile WWW
October 09, 2016, 08:58:30 PM
 #4

achow101 thanks for your answear. I was looking for it for a long time.
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!