diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 21:12:07 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 21:12:07 +0800 |
commit | efcc93e7da9f47b99fc9252dc741b20086aeb4b2 (patch) | |
tree | 6c481bd4ff229a2aa8e0533e2999ce2229dd0b9f /xeth/xeth.go | |
parent | 739c36ad4df63580bef241a4da8d2cc5010eab54 (diff) | |
download | dexon-efcc93e7da9f47b99fc9252dc741b20086aeb4b2.tar dexon-efcc93e7da9f47b99fc9252dc741b20086aeb4b2.tar.gz dexon-efcc93e7da9f47b99fc9252dc741b20086aeb4b2.tar.bz2 dexon-efcc93e7da9f47b99fc9252dc741b20086aeb4b2.tar.lz dexon-efcc93e7da9f47b99fc9252dc741b20086aeb4b2.tar.xz dexon-efcc93e7da9f47b99fc9252dc741b20086aeb4b2.tar.zst dexon-efcc93e7da9f47b99fc9252dc741b20086aeb4b2.zip |
Move Account register to xeth
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r-- | xeth/xeth.go | 36 |
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"` |