From ca1b2a1a91401255ab4e26cec7eb575b99ecb8da Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 3 Jan 2015 17:18:43 +0100 Subject: 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 --- state/manifest.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'state') 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 -- cgit v1.2.3