diff options
| author | Hampus Sjöberg <[email protected]> | 2016-09-06 22:30:30 +0200 |
|---|---|---|
| committer | Hampus Sjöberg <[email protected]> | 2016-09-06 22:30:30 +0200 |
| commit | fdf82fba3105c3c824e594db8cd7c55c4f692744 (patch) | |
| tree | c06d2747fcd2caa329a2ce514da1caa4264110cd /src/primitives/transaction.h | |
| parent | Merge #8466: [Trivial] Do not shadow variables in networking code (diff) | |
| download | discoin-fdf82fba3105c3c824e594db8cd7c55c4f692744.tar.xz discoin-fdf82fba3105c3c824e594db8cd7c55c4f692744.zip | |
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.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 5689d15bf..16c2e5c45 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 { |