Changed prev_hash to block_hash, state transition now uses vm env

* PREVHASH => BLOCKHASH( N )
* State transition object uses VMEnv as it's query interface
* Updated vm.Enviroment has GetHash( n ) for BLOCKHASH instruction
* Added GetHash to xeth, core, utils & test environments
This commit is contained in:
obscuren
2015-01-03 17:18:43 +01:00
parent 16f417f5af
commit ca1b2a1a91
13 changed files with 91 additions and 57 deletions

View File

@@ -59,7 +59,7 @@ const (
const (
// 0x40 range - block operations
PREVHASH OpCode = 0x40 + iota
BLOCKHASH OpCode = 0x40 + iota
COINBASE
TIMESTAMP
NUMBER
@@ -216,7 +216,7 @@ var opCodeToString = map[OpCode]string{
GASPRICE: "TXGASPRICE",
// 0x40 range - block operations
PREVHASH: "PREVHASH",
BLOCKHASH: "BLOCKHASH",
COINBASE: "COINBASE",
TIMESTAMP: "TIMESTAMP",
NUMBER: "NUMBER",