aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/xeth.go
diff options
context:
space:
mode:
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r--xeth/xeth.go36
1 files changed, 36 insertions, 0 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index e1e25ba09..636ee32c9 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -95,6 +95,9 @@ type XEth struct {
messagesMut sync.RWMutex
messages map[int]*whisperFilter
+
+ // regmut sync.Mutex
+ // register map[string][]*interface{} // TODO improve return type
}
// New creates an XEth that uses the given frontend.
@@ -434,6 +437,39 @@ func (self *XEth) MessagesChanged(id int) []WhisperMessage {
return nil
}
+// func (self *XEth) Register(args string) bool {
+// self.regmut.Lock()
+// defer self.regmut.Unlock()
+
+// if _, ok := self.register[args]; ok {
+// self.register[args] = nil // register with empty
+// }
+// return true
+// }
+
+// func (self *XEth) Unregister(args string) bool {
+// self.regmut.Lock()
+// defer self.regmut.Unlock()
+
+// if _, ok := self.register[args]; ok {
+// delete(self.register, args)
+// return true
+// }
+
+// return false
+// }
+
+// // TODO improve return type
+// func (self *XEth) PullWatchTx(args string) []*interface{} {
+// self.regmut.Lock()
+// defer self.regmut.Unlock()
+
+// txs := self.register[args]
+// self.register[args] = nil
+
+// return txs
+// }
+
type KeyVal struct {
Key string `json:"key"`
Value string `json:"value"`