Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Transaction Queue Integration #607

Merged
merged 19 commits into from
Mar 9, 2016
Merged

Transaction Queue Integration #607

merged 19 commits into from
Mar 9, 2016

Conversation

tomusdrw
Copy link
Collaborator

@tomusdrw tomusdrw commented Mar 5, 2016

No description provided.

@tomusdrw tomusdrw added the A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. label Mar 5, 2016
@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. A0-pleasereview 🤓 Pull request needs code review. labels Mar 5, 2016
@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Mar 5, 2016
@NikVolf NikVolf added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 5, 2016
@arkpar arkpar added A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. and removed A8-looksgood 🦄 Pull request is reviewed well. labels Mar 5, 2016
@arkpar
Copy link
Collaborator

arkpar commented Mar 5, 2016

for tx in &txs {
let _sender = tx.sender();
}
let mut transaction_queue = self.transaction_queue.lock().unwrap();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arkpar This happens in multiple threads using rayon - note par_iter.

trace!(target: "sync", "{} -> Transactions ({} entries)", peer_id, item_count);
let fetch_latest_nonce = |a : &Address| chain.nonce(a);

let mut transaction_queue = self.transaction_queue.lock().unwrap();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arkpar Fixed

@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. and removed A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. labels Mar 6, 2016
@gavofyork
Copy link
Contributor

code quality good. tests good. haven't yet done deep review of logic. might be worth doing a little additional documentation?

@tomusdrw
Copy link
Collaborator Author

tomusdrw commented Mar 7, 2016

What kind of documentation would you like? Doctests or just module level description of transaction queue? or specific part of integration?

if let SyncMessage::BlockVerified = *message {
self.sync.write().unwrap().chain_blocks_verified(&mut NetSyncIo::new(io, self.chain.deref()));
match *message {
SyncMessage::BlockVerified => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sync should not care about BlockVerified event at all. Please merge chain_blocks_verified function into chain_new_blocks. These two should be called for the same event and chain_blocks_verified is an incorrect name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. A0-pleasereview 🤓 Pull request needs code review. and removed A0-pleasereview 🤓 Pull request needs code review. A8-looksgood 🦄 Pull request is reviewed well. labels Mar 7, 2016
@arkpar
Copy link
Collaborator

arkpar commented Mar 7, 2016

looks good to me

@NikVolf NikVolf added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 8, 2016
closed_block.drain()
.commit(header.number(), &header.hash(), ancient)
.expect("State DB commit failed.");

// And update the chain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this moved down here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was introduced here: ethcore/parity@bcaed67
to avoid race conditions when chain contains uncommitted hashes. Will add a comment explaining the order.

@gavofyork
Copy link
Contributor

several questions. looks good otherwise.

@gavofyork gavofyork added A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. and removed A8-looksgood 🦄 Pull request is reviewed well. labels Mar 9, 2016
gavofyork pushed a commit that referenced this pull request Mar 9, 2016
@gavofyork gavofyork merged commit 50c8d7f into master Mar 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants