Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin/bitcoin#26646: validation, bugfix: provide more info in…
… *MempoolAcceptResult 264f9ef [validation] return MempoolAcceptResult for every tx on PCKG_TX failure (glozow) dae81e0 [refactor] rename variables in AcceptPackage for clarity (glozow) da484bc [doc] release note effective-feerate and effective-includes RPC results (glozow) 5eab397 [validation] remove PackageMempoolAcceptResult::m_package_feerate (glozow) 601bac8 [rpc] return effective-includes in testmempoolaccept and submitpackage (glozow) 1691eaa [rpc] return effective-feerate in testmempoolaccept and submitpackage (glozow) d6c7b78 [validation] return wtxids of other transactions whose fees were used (glozow) 1605886 [validation] return effective feerate from mempool validation (glozow) 5d35b4a [test] package validation quits early due to non-policy, non-missing-inputs failure (glozow) be2e4d9 [validation] when quitting early in AcceptPackage, set package_state and tx result (glozow) Pull request description: This PR fixes a bug and improves the mempool accept interface to return information more predictably. Bug: In package validation, we first try the transactions individually (see doc/policy/packages.md for more explanation) and, if they all failed for missing inputs and policy-related (i.e. fee) reasons, we'll try package validation. Otherwise, we'll just "quit early" since, for example, if a transaction had an invalid signature, adding a child will not help make it valid. Currently, when we quit early, we're not setting the `package_state` to be invalid, so the caller might think it succeeded. Also, we're returning no results - it makes more sense to return the individual transaction failure. Thanks instagibbs for catching bitcoin/bitcoin#25038 (comment)! Also, make the package results interface generally more useful/predictable: - Always return the feerate at which a transaction was considered for `CheckFeeRate` in `MempoolAcceptResult::m_effective_feerate` when it was successful. This can replace the current `PackageMempoolAcceptResult::m_package_feerate`, which only sometimes exists. - Always provide an entry for every transaction in `PackageMempoolAcceptResult::m_tx_results` when the error is `PCKG_TX`. ACKs for top commit: instagibbs: reACK bitcoin/bitcoin@264f9ef achow101: ACK 264f9ef naumenkogs: reACK 264f9ef Tree-SHA512: ce7fd9927a80030317cc6157822596e85a540feff5dbf5eea7c62da2eb50c917cdddc9da1e2ff62cc18b98b27d360151811546bd9d498859679a04bbee090837
- Loading branch information