Adding method GetTotalSize() to CTransaction

GetTotalSize() returns the total transaction size (including witness) in
bytes.
This commit is contained in:
Hampus Sjöberg
2016-09-06 22:30:30 +02:00
parent cbe9ae8c69
commit fdf82fba31
2 changed files with 12 additions and 0 deletions

View File

@@ -131,6 +131,11 @@ unsigned int CTransaction::CalculateModifiedSize(unsigned int nTxSize) const
return nTxSize;
}
unsigned int CTransaction::GetTotalSize() const
{
return ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION);
}
std::string CTransaction::ToString() const
{
std::string str;