move get block header to main.cpp