Fix invalid cast to CTransaction* in WalletModelTransaction

CWalletTx/CMerkleTx does not derive from CTransaction anymore.
This code is different in Bitcoin as it was touched by SegWit code,
resulting in an upfront fix.
This commit is contained in:
Alexander Block 2017-09-20 23:49:58 +02:00
parent 525c049316
commit 45ea6ba4dc

View File

@ -33,7 +33,7 @@ CWalletTx *WalletModelTransaction::getTransaction()
unsigned int WalletModelTransaction::getTransactionSize()
{
return (!walletTransaction ? 0 : (::GetSerializeSize(*(CTransaction*)walletTransaction, SER_NETWORK, PROTOCOL_VERSION)));
return (!walletTransaction ? 0 : (::GetSerializeSize(walletTransaction->tx, SER_NETWORK, PROTOCOL_VERSION)));
}
CAmount WalletModelTransaction::getTransactionFee()