Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#517 AccountDeleteIT #568

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,26 @@ private KeyStore loadKeyStore() {
return JavaKeystoreLoader.loadFromClasspath(jksFileName, jksPassword);
}

/**
* Returns the minimum time that can be used for escrow expirations. The ledger will not accept an expiration time
* that is earlier than the last ledger close time, so we must use the latter of current time or ledger close time
* (which for unexplained reasons can sometimes be later than now).
*
* @return An {@link Instant}.
*/
protected Instant getMinExpirationTime() {
LedgerResult result = getValidatedLedger();
Instant closeTime = xrpTimestampToInstant(
result.ledger().closeTime()
.orElseThrow(() ->
new RuntimeException("Ledger close time must be present to calculate a minimum expiration time.")
)
);

Instant now = Instant.now();
return closeTime.isBefore(now) ? now : closeTime;
}

private void logAccountCreation(Address address) {
logger.info("Generated wallet with ClassicAddress={})", address);
}
Expand Down
Loading
Loading