• Guido Trotter's avatar
    Fix sstore handling in Processor · c6868e1d
    Guido Trotter authored
    - no need to keep the sstore as an object member, remove it
    - don't reinitialize sstore only if self.cfg is None
        This is not an issue, as the Processor is recycled for every opcode,
        but in general we know that (a) we might need a different type of
        sstore for different opcodes and (b) initializating them is cheap
    - recreate sstore when chaining opcodes
        Without this fix chaining an opcode which requires a writable sstore
        to one which doesn't would fail. This doesn't happen today, but it's
        better to fix it anyway
    These changes are possible because nowadays all opcodes already require
    a working cluster/configuration.
    Reviewed-by: iustinp
mcpu.py 10.7 KB