commit
b9db5b37f2
@ -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)
|
||||
}
|
||||
|
7266
jsre/ethereum_js.go
7266
jsre/ethereum_js.go
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…
Reference in New Issue
Block a user