Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/brs/TransactionType.java
Original file line number Diff line number Diff line change
Expand Up @@ -2959,9 +2959,6 @@ protected void validateAttachment(Transaction transaction) throws SignumExceptio
{
throw new SignumException.NotValidException("Invalid escrow creation amount");
}
if (transaction.getFeeNqt() < Constants.ONE_SIGNA) {
throw new SignumException.NotValidException("Escrow transaction must have a fee at least 1 burst");
}
if (attachment.getRequiredSigners() < 1 || attachment.getRequiredSigners() > 10) {
throw new SignumException.NotValidException("Escrow required signers much be 1 - 10");
}
Expand Down Expand Up @@ -3042,8 +3039,8 @@ public TransactionDuplicationKey getDuplicationKey(Transaction transaction) {
@Override
protected void validateAttachment(Transaction transaction) throws SignumException.ValidationException {
Attachment.AdvancedPaymentEscrowSign attachment = (Attachment.AdvancedPaymentEscrowSign) transaction.getAttachment();
if (transaction.getAmountNqt() != 0 || transaction.getFeeNqt() != Constants.ONE_SIGNA) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the minimum excrow transaction fee is supposed to be hard set to a minimum of 1 so this probably should be <= or just <

if (transaction.getAmountNqt() != 0 || transaction.getFeeNqt() <= Constants.ONE_SIGNA)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. The point of this PR is to /remove/ the hardcoded minimum so the dynamic minimums can be used like every other transaction. Don't remember who was mentioning it, but someone complained about it. Should we leave it at 1, like it already is? What's the justification for a higher 1-signum fee?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly don't know much about the escrow system. Asking why it's hard set to 1 is a mystery to me. We can go dynamic, but this would be a full team decision. @ohager @frankTheTank72

throw new SignumException.NotValidException("Escrow signing must have amount 0 and fee of 1");
if (transaction.getAmountNqt() != 0) {
throw new SignumException.NotValidException("Escrow signing must have amount 0");
}
if (attachment.getEscrowId() == null || attachment.getDecision() == null) {
throw new SignumException.NotValidException("Escrow signing requires escrow id and decision set");
Expand Down