NebulousLabs/Sia — pull request #194 by lukechampine (2014-08-18 15:44:53+00:00)
Title: Remove global script execution environment

This was a bug that should have been squashed a while ago. Opcodes now take an execution environment as an argument, instead of using a global variable. I considered making each opcode a method of the environment, but I'm not sure this is possible without reflection.

A few minor changes are included here as well. The MessageRouter interface has been removed, since we no longer use ZeroNetwork and there's no need for further abstraction. MerkleCollapse is benchmarked, and the Makefile has been shortened considerably through the use of loops. Finally, the `NewBalance()` function now takes just a single uint64 argument, as there were no calls to `NewBalance()` in the codebase that used the high 64 bits. To create larger balances, you can use the `NewStringBalance()` function, or edit the bytes manually.