aboutsummaryrefslogtreecommitdiff
path: root/src/primitives/transaction.h
diff options
context:
space:
mode:
authorHampus Sjöberg <hampus.sjoberg@gmail.com>2016-09-06 22:30:30 +0200
committerHampus Sjöberg <hampus.sjoberg@gmail.com>2016-09-06 22:30:30 +0200
commitfdf82fba3105c3c824e594db8cd7c55c4f692744 (patch)
treec06d2747fcd2caa329a2ce514da1caa4264110cd /src/primitives/transaction.h
parentcbe9ae8c69b947c8cdff2e0fbf5b57c9aa09b770 (diff)
Adding method GetTotalSize() to CTransaction
GetTotalSize() returns the total transaction size (including witness) in bytes.
Diffstat (limited to 'src/primitives/transaction.h')
-rw-r--r--src/primitives/transaction.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index 5689d15bf7..16c2e5c454 100644
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -415,6 +415,13 @@ public:
// Compute modified tx size for priority calculation (optionally given tx size)
unsigned int CalculateModifiedSize(unsigned int nTxSize=0) const;
+
+ /**
+ * Get the total transaction size in bytes, including witness data.
+ * "Total Size" defined in BIP141 and BIP144.
+ * @return Total transaction size in bytes
+ */
+ unsigned int GetTotalSize() const;
bool IsCoinBase() const
{