add log, fix gettotalblock