mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge a9435e3445 into merged_master (Bitcoin PR bitcoin/bitcoin#22065)
This commit is contained in:
commit
08bd31102a
2 changed files with 4 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ namespace Consensus {
|
|||
* @param[out] fee_map Set to the transaction fee if successful.
|
||||
* Preconditions: tx.IsCoinBase() is false.
|
||||
*/
|
||||
bool CheckTxInputs(const CTransaction& tx, TxValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmountMap& fee_map, std::set<std::pair<uint256, COutPoint>>& setPeginsSpent, std::vector<CCheck*> *pvChecks, const bool cacheStore, bool fScriptChecks, const std::vector<std::pair<CScript, CScript>>& fedpegscripts);
|
||||
[[nodiscard] ]bool CheckTxInputs(const CTransaction& tx, TxValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmountMap& fee_map, std::set<std::pair<uint256, COutPoint>>& setPeginsSpent, std::vector<CCheck*> *pvChecks, const bool cacheStore, bool fScriptChecks, const std::vector<std::pair<CScript, CScript>>& fedpegscripts);
|
||||
} // namespace Consensus
|
||||
|
||||
/** Auxiliary functions for transaction validation (ideally should not be exposed) */
|
||||
|
|
|
|||
|
|
@ -247,8 +247,9 @@ FUZZ_TARGET_INIT(coins_view, initialize_coins_view)
|
|||
}
|
||||
std::vector<std::pair<CScript, CScript>> fedpegscripts; // ELEMENTS: we ought to populate this and have a more useful fuzztest
|
||||
std::set<std::pair<uint256, COutPoint> > setPeginsSpent;
|
||||
(void)Consensus::CheckTxInputs(transaction, state, coins_view_cache, fuzzed_data_provider.ConsumeIntegralInRange<int>(0, std::numeric_limits<int>::max()), tx_fee_map, setPeginsSpent, NULL, false, true, fedpegscripts);
|
||||
assert(MoneyRange(tx_fee_map));
|
||||
if (Consensus::CheckTxInputs(transaction, state, coins_view_cache, fuzzed_data_provider.ConsumeIntegralInRange<int>(0, std::numeric_limits<int>::max()), tx_fee_map, setPeginsSpent, NULL, false, true, fedpegscripts)) {
|
||||
assert(MoneyRange(tx_fee_map));
|
||||
}
|
||||
},
|
||||
[&] {
|
||||
const CTransaction transaction{random_mutable_transaction};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue