File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,11 @@ unsigned int CTransaction::CalculateModifiedSize(unsigned int nTxSize) const
131131 return nTxSize;
132132}
133133
134+ unsigned int CTransaction::GetTotalSize () const
135+ {
136+ return ::GetSerializeSize (*this , SER_NETWORK, PROTOCOL_VERSION);
137+ }
138+
134139std::string CTransaction::ToString () const
135140{
136141 std::string str;
Original file line number Diff line number Diff line change @@ -415,6 +415,13 @@ class CTransaction
415415
416416 // Compute modified tx size for priority calculation (optionally given tx size)
417417 unsigned int CalculateModifiedSize (unsigned int nTxSize=0 ) const ;
418+
419+ /* *
420+ * Get the total transaction size in bytes, including witness data.
421+ * "Total Size" defined in BIP141 and BIP144.
422+ * @return Total transaction size in bytes
423+ */
424+ unsigned int GetTotalSize () const ;
418425
419426 bool IsCoinBase () const
420427 {
You can’t perform that action at this time.
0 commit comments