/** * Gets the sum of the inputs, regardless of who owns them. */ public Coin getInputSum() { Coin inputTotal = Coin.ZERO; for (TransactionInput input: inputs) { Coin inputValue = input.getValue(); if (inputValue != null) { inputTotal = inputTotal.add(inputValue); } } return inputTotal; }
/** * Gets the sum of the inputs, regardless of who owns them. */ public Coin getInputSum() { Coin inputTotal = Coin.ZERO; for (TransactionInput input: inputs) { Coin inputValue = input.getValue(); if (inputValue != null) { inputTotal = inputTotal.add(inputValue); } } return inputTotal; }
/** * Gets the sum of the inputs, regardless of who owns them. */ public Coin getInputSum() { Coin inputTotal = Coin.ZERO; for (TransactionInput input: inputs) { Coin inputValue = input.getValue(); if (inputValue != null) { inputTotal = inputTotal.add(inputValue); } } return inputTotal; }
/** * Gets the sum of the inputs, regardless of who owns them. */ public Coin getInputSum() { Coin inputTotal = Coin.ZERO; for (TransactionInput input: inputs) { Coin inputValue = input.getValue(); if (inputValue != null) { inputTotal = inputTotal.add(inputValue); } } return inputTotal; }
/** * The transaction fee is the difference of the value of all inputs and the value of all outputs. Currently, the fee * can only be determined for transactions created by us. * * @return fee, or null if it cannot be determined */ public Coin getFee() { Coin fee = Coin.ZERO; for (TransactionInput input : inputs) { if (input.getValue() == null) return null; fee = fee.add(input.getValue()); } for (TransactionOutput output : outputs) { fee = fee.subtract(output.getValue()); } return fee; }
/** * The transaction fee is the difference of the value of all inputs and the value of all outputs. Currently, the fee * can only be determined for transactions created by us. * * @return fee, or null if it cannot be determined */ public Coin getFee() { Coin fee = Coin.ZERO; if (inputs.isEmpty() || outputs.isEmpty()) // Incomplete transaction return null; for (TransactionInput input : inputs) { if (input.getValue() == null) return null; fee = fee.add(input.getValue()); } for (TransactionOutput output : outputs) { fee = fee.subtract(output.getValue()); } return fee; }
/** * The transaction fee is the difference of the value of all inputs and the value of all outputs. Currently, the fee * can only be determined for transactions created by us. * * @return fee, or null if it cannot be determined */ public Coin getFee() { Coin fee = Coin.ZERO; for (TransactionInput input : inputs) { if (input.getValue() == null) return null; fee = fee.add(input.getValue()); } for (TransactionOutput output : outputs) { fee = fee.subtract(output.getValue()); } return fee; }
/** * The transaction fee is the difference of the value of all inputs and the value of all outputs. Currently, the fee * can only be determined for transactions created by us. * * @return fee, or null if it cannot be determined */ public Coin getFee() { Coin fee = Coin.ZERO; if (inputs.isEmpty() || outputs.isEmpty()) // Incomplete transaction return null; for (TransactionInput input : inputs) { if (input.getValue() == null) return null; fee = fee.add(input.getValue()); } for (TransactionOutput output : outputs) { fee = fee.subtract(output.getValue()); } return fee; }
String scriptSigStr = in.getScriptSig().toString(); s.append(!Strings.isNullOrEmpty(scriptSigStr) ? scriptSigStr : "<no scriptSig>"); final Coin value = in.getValue(); if (value != null) s.append(" ").append(value.toFriendlyString());
Coin value = i.getValue(); if(value == null) missingTx = true;
Coin value = txin.getValue(); if(value != null) nValueIn = nValueIn.add(value);