def replay_block(self, block_to_replay, limit=<NUM_LIT:5>):
if block_to_replay == '<STR_LIT>':<EOL><INDENT>if self.verbose:<EOL><INDENT>print("<STR_LIT>" % source.upper())<EOL><DEDENT>block = get_block(self.source, latest=True, verbose=self.verbose)<EOL>if self.verbose:<EOL><INDENT>print("<STR_LIT>" % (self.source.upper(), block['<STR_LIT>']))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>blocknum = block_to_replay if type(block_to_replay) == int else block_to_replay['<STR_LIT>']<EOL>if blocknum < self.parent_fork_block or blocknum < self.child_fork_block:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT><DEDENT>if type(block_to_replay) is not dict:<EOL><INDENT>if self.verbose:<EOL><INDENT>print("<STR_LIT>" % (self.source.upper(), block_to_replay))<EOL><DEDENT>block = get_block(self.source, block_number=int(block_to_replay), verbose=self.verbose)<EOL><DEDENT>else:<EOL><INDENT>block = block_to_replay<EOL><DEDENT>if self.verbose:<EOL><INDENT>print("<STR_LIT>" % (self.pusher.name, self.destination.upper()))<EOL>print("<STR_LIT>" % (self.tx_fetcher.name, self.source.upper()))<EOL>print("<STR_LIT>", len(block['<STR_LIT>']), "<STR_LIT>", (limit or "<STR_LIT>"))<EOL><DEDENT>results = []<EOL>enforced_limit = (limit or len(block['<STR_LIT>']))<EOL>for i, txid in enumerate(block['<STR_LIT>'][:enforced_limit]):<EOL><INDENT>print("<STR_LIT>", txid)<EOL>self._replay_tx(txid, i)<EOL><DEDENT>
Replay all transactions in parent currency to passed in "source" currency.
Block_to_replay can either be an integer or a block object.