locked correctBlockNodeIds
Fix locking
Remove envlock, add env thread.
Merge remote-tracking branch 'upstream/master' into next
Merge remote-tracking branch 'freeminer/next' into freeminer_next