@@ -240,18 +240,7 @@ bool CheckShieldStake(const CBlock& block, CValidationState& state, const CChain
240
240
const auto & p = block.shieldStakeProof ;
241
241
const int DOS_LEVEL_BLOCK = 100 ;
242
242
243
- uint256 dataToBeSigned;
244
- try {
245
- // TODO: write signature for shield
246
- // dataToBeSigned = SignatureHash(scriptCode, tx, NOT_AN_INPUT, SIGHASH_ALL, 0, SIGVERSION_SAPLING);
247
- } catch (const std::logic_error& ex) {
248
- // A logic error should never occur because we pass NOT_AN_INPUT and
249
- // SIGHASH_ALL to SignatureHash().
250
- return state.DoS (100 , error (" %s: error computing signature hash" , __func__),
251
- REJECT_INVALID, " error-computing-signature-hash" );
252
- }
253
-
254
- if (!librustzcash_sapling_check_spend (ctx, p.inputCv .begin (), inputNote.anchor .begin (), inputNote.nullifier .begin (), p.rk .begin (), p.inputProof .begin (), p.spendSig .begin (), dataToBeSigned.begin ())) {
243
+ if (!librustzcash_sapling_check_spend (ctx, p.inputCv .begin (), inputNote.anchor .begin (), inputNote.nullifier .begin (), p.rk .begin (), p.inputProof .begin (), nullptr , nullptr )) {
255
244
librustzcash_sapling_verification_ctx_free (ctx);
256
245
return state.DoS (
257
246
DOS_LEVEL_BLOCK,
@@ -265,7 +254,7 @@ bool CheckShieldStake(const CBlock& block, CValidationState& state, const CChain
265
254
REJECT_INVALID, " bad-txns-sapling-output-description-invalid" );
266
255
}
267
256
268
- if (!librustzcash_sapling_final_check (ctx, block.shieldStakeProof .amount , block.shieldStakeProof .sig .data (), dataToBeSigned. begin () )) {
257
+ if (!librustzcash_sapling_final_check (ctx, block.shieldStakeProof .amount , block.shieldStakeProof .sig .data (), nullptr )) {
269
258
librustzcash_sapling_verification_ctx_free (ctx);
270
259
return state.DoS (
271
260
100 ,
0 commit comments