@@ -2601,8 +2601,8 @@ void PrecomputedTransactionData::Init(const T& txTo, std::vector<CTxOut>&& spent
2601
2601
m_spent_output_spk_single_hashes = GetSpentScriptPubKeysSHA256 (m_spent_outputs);
2602
2602
m_output_spk_single_hashes = GetOutputScriptPubKeysSHA256 (txTo);
2603
2603
2604
- std::vector<rawBuffer > simplicityRawAnnex (txTo.witness .vtxinwit .size ());
2605
- std::vector<rawInput > simplicityRawInput (txTo.vin .size ());
2604
+ std::vector<rawElementsBuffer > simplicityRawAnnex (txTo.witness .vtxinwit .size ());
2605
+ std::vector<rawElementsInput > simplicityRawInput (txTo.vin .size ());
2606
2606
for (size_t i = 0 ; i < txTo.vin .size (); ++i) {
2607
2607
simplicityRawInput[i].prevTxid = txTo.vin [i].prevout .hash .begin ();
2608
2608
simplicityRawInput[i].prevIx = txTo.vin [i].prevout .n ;
@@ -2639,7 +2639,7 @@ void PrecomputedTransactionData::Init(const T& txTo, std::vector<CTxOut>&& spent
2639
2639
}
2640
2640
}
2641
2641
2642
- std::vector<rawOutput > simplicityRawOutput (txTo.vout .size ());
2642
+ std::vector<rawElementsOutput > simplicityRawOutput (txTo.vout .size ());
2643
2643
for (size_t i = 0 ; i < txTo.vout .size (); ++i) {
2644
2644
simplicityRawOutput[i].asset = txTo.vout [i].nAsset .vchCommitment .empty () ? NULL : txTo.vout [i].nAsset .vchCommitment .data ();
2645
2645
simplicityRawOutput[i].value = txTo.vout [i].nValue .vchCommitment .empty () ? NULL : txTo.vout [i].nValue .vchCommitment .data ();
@@ -2659,7 +2659,7 @@ void PrecomputedTransactionData::Init(const T& txTo, std::vector<CTxOut>&& spent
2659
2659
}
2660
2660
}
2661
2661
2662
- rawTransaction simplicityRawTx;
2662
+ rawElementsTransaction simplicityRawTx;
2663
2663
uint256 rawHash = txTo.GetHash ();
2664
2664
simplicityRawTx.txid = rawHash.begin ();
2665
2665
simplicityRawTx.input = simplicityRawInput.data ();
@@ -3114,14 +3114,14 @@ uint32_t GenericTransactionSignatureChecker<T>::GetnIn() const
3114
3114
}
3115
3115
3116
3116
template <class T >
3117
- bool GenericTransactionSignatureChecker<T>::CheckSimplicity(const valtype& program, const valtype& witness, const rawTapEnv & simplicityRawTap, int64_t budget, ScriptError* serror) const
3117
+ bool GenericTransactionSignatureChecker<T>::CheckSimplicity(const valtype& program, const valtype& witness, const rawElementsTapEnv & simplicityRawTap, int64_t budget, ScriptError* serror) const
3118
3118
{
3119
3119
simplicity_err error;
3120
- tapEnv * simplicityTapEnv = simplicity_elements_mallocTapEnv (&simplicityRawTap);
3120
+ elementsTapEnv * simplicityTapEnv = simplicity_elements_mallocTapEnv (&simplicityRawTap);
3121
3121
3122
3122
assert (txdata->m_simplicity_tx_data );
3123
3123
assert (simplicityTapEnv);
3124
- if (!simplicity_elements_execSimplicity (&error, 0 , txdata->m_simplicity_tx_data .get (), nIn, simplicityTapEnv, txdata->m_hash_genesis_block .data (), budget, 0 , program.data (), program.size (), witness.data (), witness.size ())) {
3124
+ if (!simplicity_elements_execSimplicity (&error, 0 , txdata->m_simplicity_tx_data .get (), nIn, simplicityTapEnv, txdata->m_hash_genesis_block .data (), 0 , budget, 0 , program.data (), program.size (), witness.data (), witness.size ())) {
3125
3125
assert (!" simplicity_elements_execSimplicity internal error" );
3126
3126
}
3127
3127
simplicity_elements_freeTapEnv (simplicityTapEnv);
@@ -3154,6 +3154,7 @@ bool GenericTransactionSignatureChecker<T>::CheckSimplicity(const valtype& progr
3154
3154
case SIMPLICITY_ERR_ANTIDOS: return set_error (serror, SCRIPT_ERR_SIMPLICITY_ANTIDOS);
3155
3155
case SIMPLICITY_ERR_HIDDEN_ROOT: return set_error (serror, SCRIPT_ERR_SIMPLICITY_HIDDEN_ROOT);
3156
3156
case SIMPLICITY_ERR_AMR: return set_error (serror, SCRIPT_ERR_SIMPLICITY_AMR);
3157
+ case SIMPLICITY_ERR_OVERWEIGHT: return set_error (serror, SCRIPT_ERR_SIMPLICITY_OVERWEIGHT);
3157
3158
default : return set_error (serror, SCRIPT_ERR_UNKNOWN_ERROR);
3158
3159
}
3159
3160
}
@@ -3312,7 +3313,7 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, int witversion,
3312
3313
const valtype& simplicity_program = SpanPopBack (stack);
3313
3314
const valtype& simplicity_witness = SpanPopBack (stack);
3314
3315
const int64_t budget = ::GetSerializeSize (witness.stack , PROTOCOL_VERSION) + VALIDATION_WEIGHT_OFFSET;
3315
- rawTapEnv simplicityRawTap;
3316
+ rawElementsTapEnv simplicityRawTap;
3316
3317
simplicityRawTap.controlBlock = control.data ();
3317
3318
simplicityRawTap.pathLen = (control.size () - TAPROOT_CONTROL_BASE_SIZE) / TAPROOT_CONTROL_NODE_SIZE;
3318
3319
simplicityRawTap.scriptCMR = script_bytes.data ();
0 commit comments