MCPcopy Create free account
hub / github.com/ElementsProject/elements / PackageMempoolAcceptResult

Class PackageMempoolAcceptResult

src/validation.h:237–255  ·  view source on GitHub ↗

* Validation result for package mempool acceptance. */

Source from the content-addressed store, hash-verified

235* Validation result for package mempool acceptance.
236*/
237struct PackageMempoolAcceptResult
238{
239 const PackageValidationState m_state;
240 /**
241 * Map from wtxid to finished MempoolAcceptResults. The client is responsible
242 * for keeping track of the transaction objects themselves. If a result is not
243 * present, it means validation was unfinished for that transaction. If there
244 * was a package-wide error (see result in m_state), m_tx_results will be empty.
245 */
246 std::map<const uint256, const MempoolAcceptResult> m_tx_results;
247
248 explicit PackageMempoolAcceptResult(PackageValidationState state,
249 std::map<const uint256, const MempoolAcceptResult>&& results)
250 : m_state{state}, m_tx_results(std::move(results)) {}
251
252 /** Constructor to create a PackageMempoolAcceptResult from a single MempoolAcceptResult */
253 explicit PackageMempoolAcceptResult(const uint256& wtxid, const MempoolAcceptResult& result)
254 : m_tx_results{ {wtxid, result} } {}
255};
256
257/**
258 * Try to add a transaction to the mempool. This is an internal function and is exposed only for testing.

Callers 3

AcceptPackageMethod · 0.85
testmempoolacceptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected