mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-23 06:35:17 +01:00
TransactionInput, TransactionOutput: make setParent()
protected
Rather than using this method, we should prefer passing the parent transaction via constructor.
This commit is contained in:
parent
81fb0c5acb
commit
f588b8e945
2 changed files with 2 additions and 2 deletions
|
@ -513,7 +513,7 @@ public class TransactionInput extends Message {
|
|||
return DefaultRiskAnalysis.isInputStandard(this);
|
||||
}
|
||||
|
||||
public final void setParent(@Nullable Transaction parent) {
|
||||
protected final void setParent(@Nullable Transaction parent) {
|
||||
if (this.parent != null && this.parent != parent && parent != null) {
|
||||
// After old parent is unlinked it won't be able to receive notice if this child
|
||||
// changes internally. To be safe we invalidate the parent cache to ensure it rebuilds
|
||||
|
|
|
@ -406,7 +406,7 @@ public class TransactionOutput extends Message {
|
|||
return new TransactionOutput(null, Coin.valueOf(value), Arrays.copyOf(scriptBytes, scriptBytes.length));
|
||||
}
|
||||
|
||||
public final void setParent(@Nullable Transaction parent) {
|
||||
protected final void setParent(@Nullable Transaction parent) {
|
||||
if (this.parent != null && this.parent != parent && parent != null) {
|
||||
// After old parent is unlinked it won't be able to receive notice if this child
|
||||
// changes internally. To be safe we invalidate the parent cache to ensure it rebuilds
|
||||
|
|
Loading…
Add table
Reference in a new issue