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
131
131
return nTxSize;
132
132
}
133
133
134
+ unsigned int CTransaction::GetTotalSize () const
135
+ {
136
+ return ::GetSerializeSize (*this , SER_NETWORK, PROTOCOL_VERSION);
137
+ }
138
+
134
139
std::string CTransaction::ToString () const
135
140
{
136
141
std::string str;
Original file line number Diff line number Diff line change @@ -415,6 +415,13 @@ class CTransaction
415
415
416
416
// Compute modified tx size for priority calculation (optionally given tx size)
417
417
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 ;
418
425
419
426
bool IsCoinBase () const
420
427
{
You can’t perform that action at this time.
0 commit comments