Skip to content

Commit

Permalink
refactor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterChen13579 committed Jul 27, 2023
1 parent 0854bba commit 86ac36b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/ripple/app/tx/impl/DeleteAccount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,6 @@ DeleteAccount::preclaim(PreclaimContext const& ctx)
if (cp)
return tecHAS_OBLIGATIONS;
}

// We don't allow an account to be deleted if its sequence number
// is within 256 of the current ledger. This prevents replay of old
// transactions if this account is resurrected after it is deleted.
//
// We look at the account's Sequence rather than the transaction's
// Sequence in preparation for Tickets.
if ((*sleAccount)[sfSequence] + accountDeleteSeqDelta > ctx.view.seq())
Expand Down
3 changes: 3 additions & 0 deletions src/ripple/protocol/SystemParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ constexpr std::ratio<80, 100> postFixAmendmentMajorityCalcThreshold;
/** The minimum amount of time an amendment must hold a majority */
constexpr std::chrono::seconds const defaultAmendmentMajorityTime = weeks{2};

// We don't allow an account to be deleted if its sequence number
// is within 256 of the current ledger. This prevents replay of old
// transactions if this account is resurrected after it is deleted.
static constexpr std::uint32_t accountDeleteSeqDelta{255u};

} // namespace ripple
Expand Down

0 comments on commit 86ac36b

Please sign in to comment.