-
Notifications
You must be signed in to change notification settings - Fork 28
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
use the message store for mempool validation #218
Conversation
let set_postfix = type_to_set_postfix(message_data.r#type()); | ||
let primary_key = | ||
make_message_primary_key(fid, set_postfix as u8, Some(&ts_hash)); | ||
let existing_message = get_message_by_key( |
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.
This is too low level for the mempool. It should just be doing stores.message_exists(&message);
}, | ||
MempoolMessage::ValidatorMessage(message) => { | ||
if let Some(onchain_event) = &message.on_chain_event { | ||
match stores.onchain_event_store.exists(&onchain_event) { |
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.
I would push this into stores.onchain_event_exists
as well.
match &fname_transfer.proof { | ||
None => return false, | ||
Some(proof) => { | ||
let username_proof = UserDataStore::get_username_proof( |
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.
Same here
Switch from using the trie to the account store for the duplicate message check in the mempool.