@@ -240,18 +240,7 @@ bool CheckShieldStake(const CBlock& block, CValidationState& state, const CChain
240240 const auto & p = block.shieldStakeProof ;
241241 const int DOS_LEVEL_BLOCK = 100 ;
242242
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 )) {
255244 librustzcash_sapling_verification_ctx_free (ctx);
256245 return state.DoS (
257246 DOS_LEVEL_BLOCK,
@@ -265,7 +254,7 @@ bool CheckShieldStake(const CBlock& block, CValidationState& state, const CChain
265254 REJECT_INVALID, " bad-txns-sapling-output-description-invalid" );
266255 }
267256
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 )) {
269258 librustzcash_sapling_verification_ctx_free (ctx);
270259 return state.DoS (
271260 100 ,
0 commit comments