diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-04 00:18:43 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-04 00:18:43 +0800 |
commit | ca1b2a1a91401255ab4e26cec7eb575b99ecb8da (patch) | |
tree | 87b3c8fed57f688c138288ed5d90a0a3a1e3274b /state | |
parent | 16f417f5af16de8f1c2c140f8b249bd989200bd3 (diff) | |
download | dexon-ca1b2a1a91401255ab4e26cec7eb575b99ecb8da.tar.gz dexon-ca1b2a1a91401255ab4e26cec7eb575b99ecb8da.tar.zst dexon-ca1b2a1a91401255ab4e26cec7eb575b99ecb8da.zip |
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
Diffstat (limited to 'state')
-rw-r--r-- | state/manifest.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/state/manifest.go b/state/manifest.go index 21cd04a1a..994019a08 100644 --- a/state/manifest.go +++ b/state/manifest.go @@ -30,6 +30,12 @@ func (self *Manifest) AddMessage(msg *Message) *Message { return msg } +func (self *Manifest) SetHash(hash []byte) { + for _, message := range self.Messages { + message.Block = hash + } +} + type Messages []*Message type Message struct { To, From []byte |