aboutsummaryrefslogtreecommitdiffstats
path: root/state/manifest.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-12 06:46:45 +0800
committerobscuren <geffobscura@gmail.com>2015-02-12 06:46:45 +0800
commit3f6baa45a7fb1ae5fd7966d2763a2a776a65eb96 (patch)
tree086df09974d106c112b83377abd3f2b7e15b382c /state/manifest.go
parent558c67d3922232daefbf904cd2914c4eb5232e4b (diff)
downloadgo-tangerine-3f6baa45a7fb1ae5fd7966d2763a2a776a65eb96.tar
go-tangerine-3f6baa45a7fb1ae5fd7966d2763a2a776a65eb96.tar.gz
go-tangerine-3f6baa45a7fb1ae5fd7966d2763a2a776a65eb96.tar.bz2
go-tangerine-3f6baa45a7fb1ae5fd7966d2763a2a776a65eb96.tar.lz
go-tangerine-3f6baa45a7fb1ae5fd7966d2763a2a776a65eb96.tar.xz
go-tangerine-3f6baa45a7fb1ae5fd7966d2763a2a776a65eb96.tar.zst
go-tangerine-3f6baa45a7fb1ae5fd7966d2763a2a776a65eb96.zip
Documented methods & removed old manifest
Diffstat (limited to 'state/manifest.go')
-rw-r--r--state/manifest.go61
1 files changed, 0 insertions, 61 deletions
diff --git a/state/manifest.go b/state/manifest.go
deleted file mode 100644
index 994019a08..000000000
--- a/state/manifest.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package state
-
-import (
- "fmt"
- "math/big"
-)
-
-// Object manifest
-//
-// The object manifest is used to keep changes to the state so we can keep track of the changes
-// that occurred during a state transitioning phase.
-type Manifest struct {
- Messages Messages
-}
-
-func NewManifest() *Manifest {
- m := &Manifest{}
- m.Reset()
-
- return m
-}
-
-func (m *Manifest) Reset() {
- m.Messages = nil
-}
-
-func (self *Manifest) AddMessage(msg *Message) *Message {
- self.Messages = append(self.Messages, msg)
-
- 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
- Input []byte
- Output []byte
- Path int
- Origin []byte
- Timestamp int64
- Coinbase []byte
- Block []byte
- Number *big.Int
- Value *big.Int
-
- ChangedAddresses [][]byte
-}
-
-func (self *Message) AddStorageChange(addr []byte) {
- self.ChangedAddresses = append(self.ChangedAddresses, addr)
-}
-
-func (self *Message) String() string {
- return fmt.Sprintf("Message{to: %x from: %x input: %x output: %x origin: %x coinbase: %x block: %x number: %v timestamp: %d path: %d value: %v", self.To, self.From, self.Input, self.Output, self.Origin, self.Coinbase, self.Block, self.Number, self.Timestamp, self.Path, self.Value)
-}