/** * Returns the minimum value for this output to be considered "not dust", i.e. the transaction will be relayable * and mined by default miners. For normal pay to address outputs, this is 2730 satoshis, the same as * {@link Transaction#MIN_NONDUST_OUTPUT}. */ public Coin getMinNonDustValue() { return getMinNonDustValue(Transaction.REFERENCE_DEFAULT_MIN_TX_FEE.multiply(3)); }
/** * Returns the minimum value for this output to be considered "not dust", i.e. the transaction will be relayable * and mined by default miners. For normal pay to address outputs, this is 2730 satoshis, the same as * {@link Transaction#MIN_NONDUST_OUTPUT}. */ public Coin getMinNonDustValue() { return getMinNonDustValue(Transaction.REFERENCE_DEFAULT_MIN_TX_FEE.multiply(3)); }
/** * Returns the minimum value for this output to be considered "not dust", i.e. the transaction will be relayable * and mined by default miners. For normal pay to address outputs, this is 2730 satoshis, the same as * {@link Transaction#MIN_NONDUST_OUTPUT}. */ public Coin getMinNonDustValue() { return getMinNonDustValue(Transaction.REFERENCE_DEFAULT_MIN_TX_FEE.multiply(3)); }
/** * Will this transaction be relayable and mined by default miners? */ public boolean isDust() { // Transactions that are OP_RETURN can't be dust regardless of their value. if (getScriptPubKey().isOpReturn()) return false; return getValue().isLessThan(getMinNonDustValue()); }
/** * Will this transaction be relayable and mined by default miners? */ public boolean isDust() { // Transactions that are OP_RETURN can't be dust regardless of their value. if (getScriptPubKey().isOpReturn()) return false; return getValue().isLessThan(getMinNonDustValue()); }
/** * Returns the minimum value for this output to be considered "not dust", i.e. the transaction will be relayable * and mined by default miners. For normal pay to address outputs, this is 2730 satoshis, the same as * {@link Transaction#MIN_NONDUST_OUTPUT}. */ public Coin getMinNonDustValue() { return getMinNonDustValue(params.isDIP0001ActiveAtTip() ? Transaction.REFERENCE_DEFAULT_MIN_TX_FEE.multiply(3).div(10) : Transaction.REFERENCE_DEFAULT_MIN_TX_FEE.multiply(3)); }
/** * Will this transaction be relayable and mined by default miners? */ public boolean isDust() { // Transactions that are OP_RETURN can't be dust regardless of their value. if (getScriptPubKey().isOpReturn()) return false; return getValue().isLessThan(getMinNonDustValue()); }
/** * Will this transaction be relayable and mined by default miners? */ public boolean isDust() { // Transactions that are OP_RETURN can't be dust regardless of their value. if (getScriptPubKey().isOpReturn()) return false; return getValue().isLessThan(getMinNonDustValue()); }
@Test public void getMinNonDustValue() throws Exception { TransactionOutput payToAddressOutput = new TransactionOutput(PARAMS, null, Coin.COIN, myAddress); assertEquals(Transaction.MIN_NONDUST_OUTPUT, payToAddressOutput.getMinNonDustValue()); } }
changeOutput.getMinNonDustValue().add(Coin.SATOSHI)); } else { size += changeOutput.unsafeBitcoinSerialize().length + VarInt.sizeOf(req.tx.getOutputs().size()) - VarInt.sizeOf(req.tx.getOutputs().size() - 1);
changeOutput.getMinNonDustValue().add(Coin.SATOSHI)); } else { size += changeOutput.unsafeBitcoinSerialize().length + VarInt.sizeOf(req.tx.getOutputs().size()) - VarInt.sizeOf(req.tx.getOutputs().size() - 1);
changeOutput.getMinNonDustValue().add(Coin.SATOSHI)); } else { size += changeOutput.unsafeBitcoinSerialize().length + VarInt.sizeOf(req.tx.getOutputs().size()) - VarInt.sizeOf(req.tx.getOutputs().size() - 1);
if (output.getMinNonDustValue().isGreaterThan(output.getValue())) { throw new CouldNotAdjustDownwards(); Coin missingToNotBeDust = changeOutput.getMinNonDustValue().subtract(changeOutput.getValue()); changeOutput.setValue(changeOutput.getValue().add(missingToNotBeDust)); TransactionOutput firstOutput = tx.getOutputs().get(0);
if (!fullyUsedUp && refundSize.isLessThan(req.tx.getOutput(0).getMinNonDustValue())) throw new ValueOutOfRangeException("Attempt to refund negative value or value too small to be accepted by the network");
if (!fullyUsedUp && refundSize.isLessThan(req.tx.getOutput(0).getMinNonDustValue())) throw new ValueOutOfRangeException("Attempt to refund negative value or value too small to be accepted by the network");
if (!fullyUsedUp && refundSize.isLessThan(req.tx.getOutput(0).getMinNonDustValue())) throw new ValueOutOfRangeException("Attempt to refund negative value or value too small to be accepted by the network");
if (!fullyUsedUp && refundSize.isLessThan(req.tx.getOutput(0).getMinNonDustValue())) throw new ValueOutOfRangeException("Attempt to refund negative value or value too small to be accepted by the network");