mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-26 03:31:23 +00:00
Modified post-trigger last reference checking, to now require a non-null value
This allows for compatibility with TRANSFER_PRIVS validation in commit 8950bb7
, which treats any account with a non-null reference as "existing". It also avoids possible unknown side effects from trying to process and store transactions with a null reference - something that wouldn't have been possible until the validation was removed.
This commit is contained in:
@@ -90,7 +90,8 @@ public class ArbitraryTransaction extends Transaction {
|
||||
|
||||
// Disable reference checking after feature trigger timestamp
|
||||
if (this.arbitraryTransactionData.getTimestamp() >= BlockChain.getInstance().getDisableReferenceTimestamp()) {
|
||||
return true;
|
||||
// Allow any non-null value
|
||||
return this.arbitraryTransactionData.getReference() != null;
|
||||
}
|
||||
|
||||
if (this.arbitraryTransactionData.getReference() == null) {
|
||||
|
@@ -78,7 +78,8 @@ public class AtTransaction extends Transaction {
|
||||
public boolean hasValidReference() throws DataException {
|
||||
// Disable reference checking after feature trigger timestamp
|
||||
if (this.atTransactionData.getTimestamp() >= BlockChain.getInstance().getDisableReferenceTimestamp()) {
|
||||
return true;
|
||||
// Allow any non-null value
|
||||
return this.atTransactionData.getReference() != null;
|
||||
}
|
||||
|
||||
// Check reference is correct, using AT account, not transaction creator which is null account
|
||||
|
@@ -167,7 +167,8 @@ public class MessageTransaction extends Transaction {
|
||||
|
||||
// Disable reference checking after feature trigger timestamp
|
||||
if (this.messageTransactionData.getTimestamp() >= BlockChain.getInstance().getDisableReferenceTimestamp()) {
|
||||
return true;
|
||||
// Allow any non-null value
|
||||
return this.messageTransactionData.getReference() != null;
|
||||
}
|
||||
|
||||
if (this.messageTransactionData.getReference() == null)
|
||||
|
@@ -907,7 +907,8 @@ public abstract class Transaction {
|
||||
public boolean hasValidReference() throws DataException {
|
||||
// Disable reference checking after feature trigger timestamp
|
||||
if (this.transactionData.getTimestamp() >= BlockChain.getInstance().getDisableReferenceTimestamp()) {
|
||||
return true;
|
||||
// Allow any non-null value
|
||||
return this.transactionData.getReference() != null;
|
||||
}
|
||||
|
||||
Account creator = getCreator();
|
||||
|
Reference in New Issue
Block a user