mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-14 11:15:51 +00:00
When connecting outputs to inputs, cache its value in the input. This will make sure the fee is also known after a blockchain replay.
This commit is contained in:
parent
4d3297d334
commit
18c63a703f
@ -60,7 +60,7 @@ public class TransactionInput extends ChildMessage implements Serializable {
|
||||
transient private WeakReference<Script> scriptSig;
|
||||
/** Value of the output connected to the input, if known. This field does not participate in equals()/hashCode(). */
|
||||
@Nullable
|
||||
private final Coin value;
|
||||
private Coin value;
|
||||
|
||||
/**
|
||||
* Creates an input that connects to nothing - used only in creation of coinbase transactions.
|
||||
@ -375,6 +375,7 @@ public class TransactionInput extends ChildMessage implements Serializable {
|
||||
public void connect(TransactionOutput out) {
|
||||
outpoint.fromTx = out.getParentTransaction();
|
||||
out.markAsSpent(this);
|
||||
value = out.getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user