Remove a FIXME by fixing it.

This commit is contained in:
JoelKatz
2012-04-24 03:32:12 -07:00
parent f4639058f0
commit f36d1fdc08

View File

@@ -340,14 +340,13 @@ void Peer::recvTransaction(newcoin::TMTransaction& packet)
Transaction::pointer tx;
try
{
std::string rawTx=packet.rawtransaction();
std::string rawTx = packet.rawtransaction();
Serializer s(std::vector<unsigned char>(rawTx.begin(), rawTx.end()));
SerializerIterator sit(s);
SerializedTransaction::pointer stx=boost::make_shared<SerializedTransaction>(boost::ref(sit), -1);
SerializedTransaction::pointer stx = boost::make_shared<SerializedTransaction>(boost::ref(sit), -1);
if(stx->getTxnType()!=ttMAKE_PAYMENT) throw(0); // FIXME to support other transaction
tx=boost::make_shared<Transaction>(stx, true);
if(tx->getStatus()==INVALID) throw(0);
tx = boost::make_shared<Transaction>(stx, true);
if (tx->getStatus() == INVALID) throw(0);
}
catch (...)
{
@@ -359,7 +358,7 @@ void Peer::recvTransaction(newcoin::TMTransaction& packet)
return;
}
tx=theApp->getOPs().processTransaction(tx, this);
tx = theApp->getOPs().processTransaction(tx, this);
if(tx->getStatus()!=INCLUDED)
{ // transaction wasn't accepted into ledger