aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/statedb.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/state/statedb.go')
-rw-r--r--core/state/statedb.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 22ffa36a0..e1dde84d1 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -87,6 +87,18 @@ func (self *StateDB) GetLogs(hash common.Hash) vm.Logs {
return self.logs[hash]
}
+func (self *StateDB) GetAllLogs() *map[common.Hash]vm.Logs {
+ copy := make(map[common.Hash]vm.Logs, len(self.logs))
+ for k, v := range self.logs {
+ copy[k] = v
+ }
+ return &copy
+}
+
+func (self *StateDB) SetAllLogs(logs *map[common.Hash]vm.Logs) {
+ self.logs = *logs
+}
+
func (self *StateDB) Logs() vm.Logs {
var logs vm.Logs
for _, lgs := range self.logs {
@@ -95,6 +107,11 @@ func (self *StateDB) Logs() vm.Logs {
return logs
}
+// TODO: this may not be the most proper thing
+func (self *StateDB) GetDB() ethdb.Database {
+ return self.db
+}
+
func (self *StateDB) AddRefund(gas *big.Int) {
self.refund.Add(self.refund, gas)
}