-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Account interface that works with overlays. #2595
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2595 +/- ##
========================================
Coverage ? 78.1%
========================================
Files ? 112
Lines ? 18250
Branches ? 0
========================================
Hits ? 14255
Misses ? 3995
Partials ? 0 |
Codecov Report
@@ Coverage Diff @@
## master #2595 +/- ##
========================================
Coverage ? 77.7%
========================================
Files ? 112
Lines ? 18156
Branches ? 0
========================================
Hits ? 14108
Misses ? 4048
Partials ? 0 |
💔 Unable to automerge due to CI failure |
💔 Unable to automerge due to CI failure |
if account.tokens == 0 { | ||
self.accounts.remove(pubkey); | ||
if purge { |
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.
purge is hurting my brain... is that only set on collapse of a fork?
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.
@rob-solana, yea when merging into root it’s set to true. I could probably hide it better.
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.
you could accept the same &[U] argument as load() does and deduce purge by checkpoints.len()?
@@ -178,7 +179,7 @@ impl Bank { | |||
loader: solana_native_loader::id(), | |||
}; | |||
self.accounts | |||
.store_slow(&system_program::id(), &system_program_account); | |||
.store_slow(true, &system_program::id(), &system_program_account); |
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.
if you store(tokens=0) with purge=true onto a fork with a parent, it exposes the parent's state, right?
* Move last_id and signature dup handling out of Accounts. * Accounts that handle overlays.
a019731
to
2239b8e
Compare
part of #2289 |
Problem
Account interface handles last_id and signature dup verification. It should only handle accounts, and it needs to work with overlays for checkpointing and forking.
Summary of Changes
Fixes #