def get_block_adjustments(crypto, points=None, intervals=None, **modes):
from moneywagon import get_block<EOL>all_points = []<EOL>if intervals:<EOL><INDENT>latest_block_height = get_block(crypto, latest=True, **modes)['<STR_LIT>']<EOL>interval = int(latest_block_height / float(intervals))<EOL>all_points = [x * interval for x in range(<NUM_LIT:1>, intervals - <NUM_LIT:1>)]<EOL><DEDENT>if points:<EOL><INDENT>all_points.extend(points)<EOL><DEDENT>all_points.sort()<EOL>adjustments = []<EOL>previous_point = <NUM_LIT:0><EOL>previous_time = (crypto_data[crypto.lower()].get('<STR_LIT>').replace(tzinfo=pytz.UTC)<EOL>or get_block(crypto, block_number=<NUM_LIT:0>, **modes)['<STR_LIT:time>']<EOL>)<EOL>for point in all_points:<EOL><INDENT>if point == <NUM_LIT:0>:<EOL><INDENT>continue<EOL><DEDENT>point_time = get_block(crypto, block_number=point, **modes)['<STR_LIT:time>']<EOL>length = point - previous_point<EOL>minutes = (point_time - previous_time).total_seconds() / <NUM_LIT><EOL>rate = minutes / length<EOL>adjustments.append([previous_point, rate])<EOL>previous_time = point_time<EOL>previous_point = point<EOL><DEDENT>return adjustments<EOL>
This utility is used to determine the actual block rate. The output can be
directly copied to the `blocktime_adjustments` setting.