def load_test_data(self, filename):
    with open(filename, 'r', encoding='utf8') as f:
        d = json.load(f)
        blocks = d['blocks']
        mocktime = d['mocktime']
        self.expected_stats = d['stats']
    self.nodes[0].setmocktime(mocktime)
    self.sync_all()
    for b in blocks:
        self.nodes[0].submitblock(b)
def load_test_data(self, filename):
    with open(filename, 'r', encoding='utf8') as f:
        d = json.load(f)
        blocks = d['blocks']
        mocktime = d['mocktime']
        self.expected_stats = d['stats']
    self.nodes[0].setmocktime(mocktime)
    self.sync_all()
    for b in blocks:
        self.nodes[0].submitblock(b)