Same as {@link #addSignedInput(TransactionOutPoint, Script, ECKey, Transaction.SigHash, boolean)}
but defaults to {@link SigHash#ALL} and "false" for the anyoneCanPay flag. This is normally what you want.
354044
public TransactionInput addSignedInput(TransactionOutPoint prevOut, Script scriptPubKey, ECKey sigKey) throws ScriptException {
        return addSignedInput(prevOut, scriptPubKey, sigKey, SigHash.ALL, false);
    }
645930
@Transactional
	@EtTcc(confirmMethod="doConfirmPay",cancelMethod="doCancelPay",idempotentType=BusinessProvider.IDENPOTENT_TYPE_FRAMEWORK,cfgClass=WalletPayRequestCfg.class)
	public WalletPayResponseVO doTryPay(WalletPayRequestVO param) {
		int update = jdbcTemplate.update("update `wallet` set freeze_amount = freeze_amount + ? where user_id = ? and (total_amount - freeze_amount) >= ?;", 
				param.getPayAmount(),param.getUserId(),param.getPayAmount());
		
		if(update != 1){
			throw new RuntimeException("can not find specific user id or have not enought money");
		}
		
		WalletPayResponseVO walletPayTccMethodResult = new WalletPayResponseVO();
		walletPayTccMethodResult.setFreezeAmount(param.getPayAmount());
		return walletPayTccMethodResult;
	}
1127285
function SignInputPacket(tx, index, coin, ring, type) {
  Packet.call(this);
  this.tx = tx || null;
  this.index = index;
  this.coin = coin || null;
  this.ring = ring || null;
  this.type = type != null ? type : 1;
}
993216
def sighash_single(self, index, script=None,
                       anyone_can_pay=False):
        '''
        
        '''
        copy_tx = self._sighash_prep(
            index=index,
            script=script)

        try:
            copy_tx_outs = copy_tx.tx_outs[:index + 1]
            copy_tx_outs = [TxOut(value=b'\xff' * 8, output_script=b'')
                            for _ in copy_tx.tx_ins]
            copy_tx_outs[index] = copy_tx.tx_outs[index]
        except IndexError:
            raise NotImplementedError(
                'I refuse to implement the SIGHASH_SINGLE bug.')

        copy_tx_ins = [tx_in.copy(sequence=b'\x00\x00\x00\x00')
                       for tx_in in copy_tx.tx_ins]
        copy_tx_ins[index] = copy_tx.tx_ins[index]
        copy_tx = copy_tx.copy(tx_ins=copy_tx_ins, tx_outs=copy_tx_outs)

        if anyone_can_pay:
            return self._sighash_anyone_can_pay(
                index=index,
                copy_tx=copy_tx,
                sighash_type=shared.SIGHASH_SINGLE)

        return self._sighash_final_hashing(
            index=index,
            copy_tx=copy_tx,
            sighash_type=shared.SIGHASH_SINGLE)
1169157
def sighash_for_legacy(index, script_code, hash_type)
      ins = inputs.map.with_index do |i, idx|
        if idx == index
          i.to_payload(script_code.delete_opcode(Bitcoin::Opcodes::OP_CODESEPARATOR))
        else
          case hash_type & 0x1f
            when SIGHASH_TYPE[:none], SIGHASH_TYPE[:single]
              i.to_payload(Bitcoin::Script.new, 0)
            else
              i.to_payload(Bitcoin::Script.new)
          end
        end
      end

      outs = outputs.map(&:to_payload)
      out_size = Bitcoin.pack_var_int(outputs.size)

      case hash_type & 0x1f
        when SIGHASH_TYPE[:none]
          outs = ''
          out_size = Bitcoin.pack_var_int(0)
        when SIGHASH_TYPE[:single]
          return "\x01".ljust(32, "\x00") if index >= outputs.size
          outs = outputs[0...(index + 1)].map.with_index { |o, idx| (idx == index) ? o.to_payload : o.to_empty_payload }.join
          out_size = Bitcoin.pack_var_int(index + 1)
      end

      if hash_type & SIGHASH_TYPE[:anyonecanpay] != 0
        ins = [ins[index]]
      end

      buf = [[version].pack('V'), Bitcoin.pack_var_int(ins.size),
          ins, out_size, outs, [lock_time, hash_type].pack('VV')].join

      Bitcoin.double_sha256(buf)
    end
179101
@Override
	public BaseRow addInput(@Nullable BaseRow previousAcc, BaseRow input) throws Exception {
		BaseRow currentAcc;
		if (previousAcc == null) {
			currentAcc = localAgg.createAccumulators();
		} else {
			currentAcc = previousAcc;
		}

		localAgg.setAccumulators(currentAcc);
		localAgg.merge(input);
		return localAgg.getAccumulators();
	}
1276543
public void batchPrecommit(TransactionCommon currentTran)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(this, tc, "batchPrecommit", currentTran);
 
    // Holds TickRanges of all messages to be sent downstream
    TickRange tr1 = null;
    TickRange tickRange = null;
    
    synchronized (this)
    {
      // 316010 : It is possible for the sourcestream to have
      // been removed when the batch timer triggers (if destination
      // is deleted). So check the streamset is still in the store.
      if ( !streamSet.isPersistent() || streamSet.isInStore() )
      {
        for (int i = 0; i < batchList.size(); i++)
        {
          tickRange = (TickRange)batchList.get(i);
          try
          {
            if ((tr1 = msgRemoved(tickRange.valuestamp, oststream, currentTran)) != null)
            {
              batchSendList.add(tr1);
              lastMsgSent = tr1.valuestamp;
            }
          }
          catch (SIResourceException e)
          {
            //FFDC
            FFDCFilter.processException(
              e,
              "com.ibm.ws.sib.processor.gd.SourceStream.batchPrecommit",
              "1:2558:1.138",
              this);
  
            SibTr.exception(tc, e);
          }
        } 
      }  
    }  
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "batchPrecommit");
  }
283496
public void putIfNoneMatch(URI uri, String eTag, String mimetype,
			byte[] content, String assertedUserId) throws IOException {
		putIfNoneMatch(uri, eTag, mimetype, content, assertedUserId, null);
	}
1206135
@Override
	public void onTxCommit(Transaction tx) {
		if (!tx.isReadOnly() && enableLogging) {
			LogSeqNum lsn = new CommitRecord(txNum).writeToLog();
			VanillaDb.logMgr().flush(lsn);
		}
	}
86960
public void addValueToKey(K key, V value) {
        this.addValuesToKey(key, Collections.singletonList(value));
    }
1319235
function SignInputResultPacket(value, witness, script) {
  Packet.call(this);
  this.value = value || false;
  this.script = script || null;
  this.witness = witness || null;
}
1354900
public static RuleViolation isInputStandard(TransactionInput input) {
        for (ScriptChunk chunk : input.getScriptSig().getChunks()) {
            if (chunk.data != null && !chunk.isShortestPossiblePushData())
                return RuleViolation.SHORTEST_POSSIBLE_PUSHDATA;
            if (chunk.isPushData()) {
                ECDSASignature signature;
                try {
                    signature = ECKey.ECDSASignature.decodeFromDER(chunk.data);
                } catch (SignatureDecodeException x) {
                    // Doesn't look like a signature.
                    signature = null;
                }
                if (signature != null) {
                    if (!TransactionSignature.isEncodingCanonical(chunk.data))
                        return RuleViolation.SIGNATURE_CANONICAL_ENCODING;
                    if (!signature.isCanonical())
                        return RuleViolation.SIGNATURE_CANONICAL_ENCODING;
                }
            }
        }
        return RuleViolation.NONE;
    }
204928
def segwit_sighash(self, index, script, prevout_value=None,
                       sighash_type=None, anyone_can_pay=False):
        '''
        
        '''
        data = ByteData()

        # 1. nVersion of the transaction (4-byte little endian)
        data += self.version

        # 2. hashPrevouts (32-byte hash)
        data += self._hash_prevouts(anyone_can_pay=anyone_can_pay)

        # 3. hashSequence (32-byte hash)
        data += self._hash_sequence(sighash_type=sighash_type,
                                    anyone_can_pay=anyone_can_pay)

        # 4. outpoint (32-byte hash + 4-byte little endian)
        data += self.tx_ins[index].outpoint

        # 5. scriptCode of the input (serialized as scripts inside CTxOuts)
        data += self._adjusted_script_code(script=script)

        # 6. value of the output spent by this input (8-byte little endian)
        data += prevout_value

        # 7. nSequence of the input (4-byte little endian)
        data += self.tx_ins[index].sequence

        # 8. hashOutputs (32-byte hash)
        data += self._hash_outputs(index=index, sighash_type=sighash_type)

        # 9. nLocktime of the transaction (4-byte little endian)
        data += self.lock_time

        # 10. sighash type of the signature (4-byte little endian)
        data += self._segwit_sighash_adjustment(sighash_type=sighash_type,
                                                anyone_can_pay=anyone_can_pay)

        return utils.hash256(data.to_bytes())
1187361
public boolean addTransactionAware(TransactionAware txAware) {
    // If the txAware is newly added, call startTx as well if there is an active transaction
    boolean added = txAwares.add(txAware);
    if (added && currentTx != null) {
      txAware.startTx(currentTx);
    }
    return added;
  }
683352
public TransactionOutput addOutput(Coin value, Address address) {
        return addOutput(new TransactionOutput(params, this, value, address));
    }
422754
public TransactionInput addSignedInput(TransactionOutput output, ECKey signingKey) {
        return addSignedInput(output.getOutPointFor(), output.getScriptPubKey(), signingKey);
    }
1058562
public TransactionInput addInput(Sha256Hash spendTxHash, long outputIndex, Script script) {
        return addInput(new TransactionInput(params, this, script.getProgram(), new TransactionOutPoint(params, outputIndex, spendTxHash)));
    }