aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-21 21:43:17 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-21 21:43:17 +0800
commit1da145675d7975bf99ef0c947cac7eaf5b87f21d (patch)
tree7bb323419bef53ddf597a804b78c3bef36a28916
parent90b672f1af50944e136bdd6e617fad90f59fe6fe (diff)
parenta61e6788db492b292baaa9c9be09eac9334ff56e (diff)
downloadgo-tangerine-1da145675d7975bf99ef0c947cac7eaf5b87f21d.tar.gz
go-tangerine-1da145675d7975bf99ef0c947cac7eaf5b87f21d.tar.zst
go-tangerine-1da145675d7975bf99ef0c947cac7eaf5b87f21d.zip
Merge pull request #1063 from bas-vk/issue1053
prefix dapp key/value entries in extradb
-rw-r--r--xeth/xeth.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index b90e0aa47..157fe76c7 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -28,6 +28,7 @@ var (
filterTickerTime = 5 * time.Minute
defaultGasPrice = big.NewInt(10000000000000) //150000000000
defaultGas = big.NewInt(90000) //500000
+ dappStorePre = []byte("dapp-")
)
// byte will be inferred
@@ -410,13 +411,15 @@ func (self *XEth) SetSolc(solcPath string) (*compiler.Solidity, error) {
return self.Solc()
}
+// store DApp value in extra database
func (self *XEth) DbPut(key, val []byte) bool {
- self.backend.ExtraDb().Put(key, val)
+ self.backend.ExtraDb().Put(append(dappStorePre, key...), val)
return true
}
+// retrieve DApp value from extra database
func (self *XEth) DbGet(key []byte) ([]byte, error) {
- val, err := self.backend.ExtraDb().Get(key)
+ val, err := self.backend.ExtraDb().Get(append(dappStorePre, key...))
return val, err
}