-
Notifications
You must be signed in to change notification settings - Fork 65
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
Adding history module and implementing inmemory block storage and mix… #205
Conversation
pub struct MultipleStrategyBlockStorage { | ||
inmemory_for_storage: InmemoryBlockStore, // for confirmed blocks | ||
persistent_block_storage: BlockStorageImpl, // for persistent block storage | ||
faithful_rpc_client: Option<Arc<RpcClient>>, // to fetch legacy blocks from faithful |
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.
that should go somewhere else.
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.
Nah we want to fall back to faithful if the link is provided..
.save(slot, block, commitment) | ||
.await; | ||
} | ||
if slot > self.last_confirmed_slot.load(Ordering::Relaxed) { |
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.
could use compare_exchange
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.
compare exchange requires anyways to fetch the value and the value will be exchanged only if it is the same as current value which may add additional complexity.
033f18c
to
1418451
Compare
changes after groovies review
8c9cd82
to
7ef29e1
Compare
…ed storage