3 suggestions
Optional improvements
[suggestion] · Concurrent-load rejection lacks a paused-window test
The paused-load test never exercises the new concurrent-activation guard or verifies that a rejected second request leaves mempool admission blocked.
Location: test/functional/feature_assumeutxo.py:246 (head).
Details and suggested fix
The FIFO pauses the first activation after m_snapshot_loading is set but before AddChainstate, so a second request using the regular snapshot file reaches the new loading guard. The later duplicate-load assertion instead exercises the already-active-snapshot check. The current guard/reset ordering is correct, but a rejected second invocation clearing the first invocation's flag would go undetected. Before the sendrawtransaction assertion, add assert_raises_rpc_error(-32603, "Can't activate a snapshot while another one is being loaded", node.loadtxoutset, dump_output_path). Keep the subsequent snapshot-loading and empty-mempool assertions to verify that the rejected request did not clear the first loader's flag.
[suggestion] · snapshot-loading rejections skip the documented rejection tracepoint
During snapshot loading, transactions rejected with snapshot-loading bypass mempool:rejected, leaving attached USDT mempool monitors unaware of those rejections.
Location: src/validation.cpp:1778 (head).
Details and suggested fix
The new non-test early return in AcceptToMemoryPool precedes the existing mempool:rejected tracepoint. A submission rejected by this branch therefore emits no transaction ID or rejection-reason event, despite the behavior documented in doc/tracing.md. Consumers such as contrib/tracing/mempool_monitor.py miss these rejections. Emit the same rejected tracepoint inside the new branch before returning to preserve observability while keeping mempool admission blocked.
[suggestion] · Package test acceptance lacks snapshot-loading coverage
The loading-window test checks only singleton testmempoolaccept, leaving the separate package test-accept exemption untested.
Location: test/functional/feature_assumeutxo.py:247 (head).
Details and suggested fix
A singleton testmempoolaccept call routes through ProcessTransaction, while multiple transactions use ProcessNewPackage(..., test_accept=true). The existing submitpackage assertion exercises only test_accept=false. Removing !test_accept from the package loading guard would therefore leave this test passing while package testmempoolaccept returned snapshot-loading without per-transaction allowed results. After constructing the existing parent-first package, call node.testmempoolaccept(package) and assert that both results have allowed=true. Keep the empty-mempool assertion before releasing the FIFO.