Additional explanation for ordering of commit/insert_block
This commit is contained in:
parent
204d31a056
commit
6d0578e19c
@ -396,7 +396,8 @@ impl<V> Client<V> where V: Verifier {
|
||||
.commit(header.number(), &header.hash(), ancient)
|
||||
.expect("State DB commit failed.");
|
||||
|
||||
// And update the chain
|
||||
// And update the chain after commit to prevent race conditions
|
||||
// (when something is in chain but you are not able to fetch details)
|
||||
self.chain.write().unwrap()
|
||||
.insert_block(&block.bytes, receipts);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user