def METHOD_NAME(self, filename):
    self.nodes[0].generate(101)
    self.nodes[0].sendtoaddress(address=self.nodes[1].getnewaddress(), amount=10, subtractfeefromamount=True)
    self.nodes[0].generate(1)
    self.sync_all()
    self.nodes[0].sendtoaddress(address=self.nodes[0].getnewaddress(), amount=10, subtractfeefromamount=True)
    self.nodes[0].sendtoaddress(address=self.nodes[0].getnewaddress(), amount=10, subtractfeefromamount=False)
    self.nodes[1].sendtoaddress(address=self.nodes[0].getnewaddress(), amount=1, subtractfeefromamount=True)
    self.sync_all()
    self.nodes[0].generate(1)
    self.expected_stats = self.get_stats()
    blocks = []
    tip = self.nodes[0].getbestblockhash()
    blockhash = None
    height = 0
    while tip != blockhash:
        blockhash = self.nodes[0].getblockhash(height)
        blocks.append(self.nodes[0].getblock(blockhash, 0))
        height += 1
    to_dump = {
        'blocks': blocks,
        'mocktime': int(self.mocktime),
        'stats': self.expected_stats,
    }
    with open(filename, 'w', encoding="utf8") as f:
        json.dump(to_dump, f, sort_keys=True, indent=2)