Fix a bug in TransactionMaster::fetch. Also, don't use this anyway.

This commit is contained in:
JoelKatz
2012-11-21 13:45:09 -08:00
parent b4e7d8c5c3
commit c36d967de8
5 changed files with 32 additions and 15 deletions

View File

@@ -1029,18 +1029,17 @@ void NetworkOPs::pubLedger(Ledger::ref lpAccepted)
for (SHAMapItem::pointer item = txSet.peekFirstItem(); !!item; item = txSet.peekNextItem(item->getTag()))
{
SerializedTransaction::pointer stTxn = theApp->getMasterTransaction().fetch(item, false, 0);
if(stTxn)
{
// XXX Need to support other results.
// XXX Need to give failures too.
TER terResult = tesSUCCESS;
SerializerIterator it(item->peekSerializer());
SerializerIterator it(item->peekSerializer());
TransactionMetaSet::pointer meta = boost::make_shared<TransactionMetaSet>(stTxn->getTransactionID(), lpAccepted->getLedgerSeq(), it.getVL());
pubAcceptedTransaction(lpAccepted, *stTxn, terResult,meta);
}
// OPTIMIZEME: Could get transaction from txn master, but still must call getVL
Serializer txnSer(it.getVL());
SerializerIterator txnIt(txnSer);
SerializedTransaction stTxn(txnIt);
TransactionMetaSet::pointer meta = boost::make_shared<TransactionMetaSet>(
stTxn.getTransactionID(), lpAccepted->getLedgerSeq(), it.getVL());
pubAcceptedTransaction(lpAccepted, stTxn, meta->getResultTER(), meta);
}
}
}