forked from Qortal/qortal
Use a zero fee for ARBITRARY transactions, as we require a PoW nonce instead.
This commit is contained in:
parent
ed2d1c4932
commit
8525fb89f8
@ -217,7 +217,7 @@ public class ArbitraryDataTransactionBuilder {
|
||||
}
|
||||
|
||||
final BaseTransactionData baseTransactionData = new BaseTransactionData(now, Group.NO_GROUP,
|
||||
lastReference, creatorPublicKey, BlockChain.getInstance().getUnitFee(), null);
|
||||
lastReference, creatorPublicKey, 0L, null);
|
||||
final int size = (int) arbitraryDataFile.size();
|
||||
final int version = 5;
|
||||
final int nonce = 0;
|
||||
|
@ -73,6 +73,14 @@ public class ArbitraryTransaction extends Transaction {
|
||||
this.arbitraryTransactionData.setNonce(MemoryPoW.compute2(transactionBytes, POW_BUFFER_SIZE, POW_DIFFICULTY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValidationResult isFeeValid() throws DataException {
|
||||
if (this.transactionData.getFee() < 0)
|
||||
return ValidationResult.NEGATIVE_FEE;
|
||||
|
||||
return ValidationResult.OK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasValidReference() throws DataException {
|
||||
// We shouldn't really get this far, but just in case:
|
||||
|
Loading…
Reference in New Issue
Block a user