Replace Serializer with Blob in SHAMapItem:

* This helps decouples SHAMap and Serializer.
* Restyle data member names.
* Rename getTag() to key().
This commit is contained in:
Howard Hinnant
2015-06-23 17:59:07 -04:00
committed by Vinnie Falco
parent 72659d431e
commit 26bfeb1319
17 changed files with 92 additions and 137 deletions

View File

@@ -64,7 +64,7 @@ STTx::pointer TransactionMaster::fetch (std::shared_ptr<SHAMapItem> const& item,
bool checkDisk, std::uint32_t uCommitLedger)
{
STTx::pointer txn;
Transaction::pointer iTx = getApp().getMasterTransaction ().fetch (item->getTag (), false);
auto iTx = getApp().getMasterTransaction ().fetch (item->key(), false);
if (!iTx)
{
@@ -76,12 +76,8 @@ STTx::pointer TransactionMaster::fetch (std::shared_ptr<SHAMapItem> const& item,
}
else if (type == SHAMapTreeNode::tnTRANSACTION_MD)
{
Serializer s;
int length;
item->peekSerializer().getVL (s.modData (), 0, length);
SerialIter sit (s.slice());
txn = std::make_shared<STTx> (std::ref (sit));
auto blob = SerialIter{item->data(), item->size()}.getVL();
txn = std::make_shared<STTx>(SerialIter{blob.data(), blob.size()});
}
}
else