* Validation result for package mempool acceptance. */
| 235 | * Validation result for package mempool acceptance. |
| 236 | */ |
| 237 | struct 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. |
no outgoing calls
no test coverage detected