Avoid the getValue confusion. Use getNValue for native, getMantissa otherwise

This commit is contained in:
JoelKatz
2012-05-27 18:23:33 -07:00
parent faa3e00aa8
commit 959fa8e298
3 changed files with 12 additions and 10 deletions

View File

@@ -164,14 +164,14 @@ STAmount SerializedTransaction::getTransactionFee() const
{
const STAmount* v = dynamic_cast<const STAmount*>(mMiddleTxn.peekAtPIndex(TransactionIFee));
if (!v) throw std::runtime_error("corrupt transaction");
return v->getValue();
return v->getNValue();
}
void SerializedTransaction::setTransactionFee(STAmount saFee)
{
STAmount* v = dynamic_cast<STAmount*>(mMiddleTxn.getPIndex(TransactionIFee));
if (!v) throw std::runtime_error("corrupt transaction");
v->setValue(saFee);
v->setNValue(saFee);
}
uint32 SerializedTransaction::getSequence() const