Add WS support for reporting accepted transactions.

This commit is contained in:
Arthur Britto
2012-07-01 00:40:56 -07:00
parent 1804530577
commit 85919c02f3
6 changed files with 100 additions and 32 deletions

View File

@@ -27,6 +27,29 @@ Transaction::pointer TransactionMaster::fetch(const uint256& txnID, bool checkDi
if (!txn) return txn;
mCache.canonicalize(txnID, txn);
return txn;
}
SerializedTransaction::pointer TransactionMaster::fetch(const SHAMapItem::pointer& item, bool checkDisk, uint32 uCommitLedger)
{
SerializedTransaction::pointer txn;
Transaction::pointer iTx = theApp->getMasterTransaction().fetch(item->getTag(), false);
if (!iTx)
{
SerializerIterator sit(item->peekSerializer());
txn = boost::make_shared<SerializedTransaction>(boost::ref(sit));
}
else
{
if (uCommitLedger)
iTx->setStatus(COMMITTED, uCommitLedger);
txn = iTx->getSTransaction();
}
return txn;
}