header sync does not touch txhashset so no need to take a write lock on it (#990)

This commit is contained in:
Antioch Peverell 2018-04-21 15:15:01 -04:00 committed by GitHub
parent 242b67182c
commit 77172057ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,11 +152,6 @@ pub fn sync_block_header(
validate_header(&bh, &mut sync_ctx)?;
add_block_header(bh, &mut sync_ctx)?;
// TODO - confirm this is needed during sync process (I don't see how it is)
// we do not touch the txhashset when syncing headers
// just taking the shared lock
let _ = header_ctx.txhashset.write().unwrap();
// now update the header_head (if new header with most work) and the sync_head
// (always)
update_header_head(bh, &mut header_ctx)?;