-
Notifications
You must be signed in to change notification settings - Fork 220
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
feat: block wallets from sending if BN connection stale #5949
feat: block wallets from sending if BN connection stale #5949
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Ack
One suggestion, but not vital.
.updated | ||
.ok_or(BaseNodeServiceError::NoChainMetadata)?; | ||
if Utc::now().naive_utc().timestamp() - last_updated.timestamp() > 15 * 60 { | ||
return Err(BaseNodeServiceError::NoChainMetadata); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this error be more specific than NoChainMetadata
. Assumedly we have some metadata it's just that we consider it stale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe.. I thought about it, but still not sure.
block wallet from sending if metadata is old
054e3b1
to
5330f96
Compare
Description
block wallet from sending if metadata from base node is stale and older than 15 mins
The console wallet will print out a warning if the connection is stale.
Motivation and Context
Sending via old metadata can cause issues with wallets using old data. The transactions might not be valid anymore
Fixes: #5855