Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
b9db5b37
Commit
b9db5b37
authored
Nov 26, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2001 from obscuren/fixes
cmd, crypto: updated web3
parents
168d0e9e
b1e01434
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6801 additions
and
1519 deletions
+6801
-1519
js.go
cmd/geth/js.go
+2
-2
ethereum_js.go
jsre/ethereum_js.go
+6796
-1516
xeth.go
xeth/xeth.go
+3
-1
No files found.
cmd/geth/js.go
View file @
b9db5b37
...
...
@@ -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
w
eb3 = require('web3');"
)
_
,
err
=
js
.
re
.
Run
(
"var
W
eb3 = 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
)
}
...
...
jsre/ethereum_js.go
View file @
b9db5b37
This diff is collapsed.
Click to expand it.
xeth/xeth.go
View file @
b9db5b37
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment