docs: public void verify(TransactionOutput output) throws VerificationException {
          if (output.parent != null) {
              if (!getOutpoint().getHash().equals(output.getParentTransaction().getTxId()))
                  throw new VerificationException("This input does not refer to the tx containing the output.");
              if (getOutpoint().getIndex() != output.getIndex())
                  throw new VerificationException("This input refers to a different output on the given tx.");
          }
          Script pubKey = output.getScriptPubKey();
          getScriptSig().correctlySpends(getParentTransaction(), getIndex(), getWitness(), getValue(), pubKey,
                  Script.ALL_VERIFY_FLAGS);
      }