mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 07:25:51 +00:00
Fix move sequencing
This commit is contained in:
committed by
Vinnie Falco
parent
7b5bf7f129
commit
eb0ece417d
@@ -45,9 +45,10 @@ convertBlobsToTxResult (
|
||||
tr->setStatus (Transaction::sqlTransactionStatus(status));
|
||||
tr->setLedger (ledger_index);
|
||||
|
||||
to.emplace_back(std::make_pair(std::move(tr),
|
||||
std::make_shared<TransactionMetaSet> (
|
||||
tr->getID (), tr->getLedger (), rawMeta)));
|
||||
auto metaset = std::make_shared<TransactionMetaSet> (
|
||||
tr->getID (), tr->getLedger (), rawMeta);
|
||||
|
||||
to.emplace_back(std::move(tr), metaset);
|
||||
};
|
||||
|
||||
void
|
||||
|
||||
@@ -287,13 +287,13 @@ public:
|
||||
uint256 const& hash,
|
||||
Backend& backend)
|
||||
{
|
||||
std::shared_ptr<NodeObject> object = NodeObject::createObject(
|
||||
type, std::move(data), hash);
|
||||
|
||||
#if RIPPLE_VERIFY_NODEOBJECT_KEYS
|
||||
assert (hash == sha512Hash(make_Slice(data)));
|
||||
#endif
|
||||
|
||||
std::shared_ptr<NodeObject> object = NodeObject::createObject(
|
||||
type, std::move(data), hash);
|
||||
|
||||
m_cache.canonicalize (hash, object, true);
|
||||
|
||||
backend.store (object);
|
||||
|
||||
@@ -713,8 +713,8 @@ OverlayImpl::selectPeers (PeerSet& set, std::size_t limit,
|
||||
v.reserve(m_publicKeyMap.size());
|
||||
for_each_unlocked ([&](std::shared_ptr<PeerImp> && e)
|
||||
{
|
||||
v.emplace_back(
|
||||
e->getScore(score(e)), std::move(e));
|
||||
auto const s = e->getScore(score(e));
|
||||
v.emplace_back(s, std::move(e));
|
||||
});
|
||||
}
|
||||
std::sort(v.begin(), v.end(),
|
||||
|
||||
Reference in New Issue
Block a user