Merge pull request #2001 from obscuren/fixes

cmd, crypto: updated web3
release/1.4
Jeffrey Wilcke 9 years ago
commit b9db5b37f2
  1. 4
      cmd/geth/js.go
  2. 8312
      jsre/ethereum_js.go
  3. 4
      xeth/xeth.go

@ -299,12 +299,12 @@ func (js *jsre) apiBindings(f xeth.Frontend) error {
utils.Fatalf("Error loading web3.js: %v", err)
}
_, err = js.re.Run("var web3 = require('web3');")
_, err = js.re.Run("var Web3 = require('web3');")
if err != nil {
utils.Fatalf("Error requiring web3: %v", err)
}
_, err = js.re.Run("web3.setProvider(jeth)")
_, err = js.re.Run("var web3 = new Web3(jeth);")
if err != nil {
utils.Fatalf("Error setting web3 provider: %v", err)
}

File diff suppressed because it is too large Load Diff

@ -644,7 +644,9 @@ func (p *XEth) NewWhisperFilter(to, from string, topics [][]string) int {
callback := func(msg WhisperMessage) {
p.messagesMu.RLock() // Only read lock to the filter pool
defer p.messagesMu.RUnlock()
p.messages[id].insert(msg)
if p.messages[id] != nil {
p.messages[id].insert(msg)
}
}
// Initialize the core whisper filter and wrap into xeth
id = p.Whisper().Watch(to, from, topics, callback)

Loading…
Cancel
Save