MCPcopy Create free account
hub / github.com/LUX-Core/lux / enqueue

Method enqueue

src/cpp-ethereum/libethereum/TransactionQueue.cpp:374–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374void TransactionQueue::enqueue(RLP const& _data, h512 const& _nodeId)
375{
376 bool queued = false;
377 {
378 Guard l(x_queue);
379 unsigned itemCount = _data.itemCount();
380 for (unsigned i = 0; i < itemCount; ++i)
381 {
382 if (m_unverified.size() >= c_maxVerificationQueueSize)
383 {
384 clog(TransactionQueueChannel) << "Transaction verification queue is full. Dropping" << itemCount - i << "transactions";
385 break;
386 }
387 m_unverified.emplace_back(UnverifiedTransaction(_data[i].data(), _nodeId));
388 queued = true;
389 }
390 }
391 if (queued)
392 m_queueReady.notify_all();
393}
394
395void TransactionQueue::verifierBody()
396{

Callers 8

appendMethod · 0.45
onPeerTransactionsMethod · 0.45
verifierBodyMethod · 0.45
importMethod · 0.45
noteReady_WITH_LOCKMethod · 0.45
retryAllUnknownMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls 4

itemCountMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.36