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
c924a841
Commit
c924a841
authored
Feb 15, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into bounty
parents
12fc590b
7299eb72
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
14 deletions
+19
-14
chain_manager.go
core/chain_manager.go
+1
-1
secp256.go
crypto/secp256k1/secp256.go
+6
-1
server.go
p2p/server.go
+4
-4
args.go
rpc/args.go
+3
-3
server.go
rpc/http/server.go
+1
-1
packages.go
rpc/packages.go
+4
-4
No files found.
core/chain_manager.go
View file @
c924a841
...
...
@@ -168,7 +168,7 @@ func (bc *ChainManager) NewBlock(coinbase []byte) *types.Block {
var
root
[]
byte
parentHash
:=
ZeroHash256
if
bc
.
C
urrentBlock
!=
nil
{
if
bc
.
c
urrentBlock
!=
nil
{
root
=
bc
.
currentBlock
.
Header
()
.
Root
parentHash
=
bc
.
lastBlockHash
}
...
...
crypto/secp256k1/secp256.go
View file @
c924a841
...
...
@@ -15,8 +15,9 @@ import "C"
import
(
"bytes"
"errors"
"github.com/ethereum/go-ethereum/crypto/randentropy"
"unsafe"
"github.com/ethereum/go-ethereum/crypto/randentropy"
)
//#define USE_FIELD_5X64
...
...
@@ -85,6 +86,10 @@ func GenerateKeyPair() ([]byte, []byte) {
}
func
GeneratePubKey
(
seckey
[]
byte
)
([]
byte
,
error
)
{
if
err
:=
VerifySeckeyValidity
(
seckey
);
err
!=
nil
{
return
nil
,
err
}
pubkey_len
:=
C
.
int
(
65
)
const
seckey_len
=
32
...
...
p2p/server.go
View file @
c924a841
...
...
@@ -436,15 +436,15 @@ func (self *BlacklistMap) Exists(pubkey []byte) (ok bool) {
}
func
(
self
*
BlacklistMap
)
Put
(
pubkey
[]
byte
)
error
{
self
.
lock
.
R
Lock
()
defer
self
.
lock
.
R
Unlock
()
self
.
lock
.
Lock
()
defer
self
.
lock
.
Unlock
()
self
.
blacklist
[
string
(
pubkey
)]
=
true
return
nil
}
func
(
self
*
BlacklistMap
)
Delete
(
pubkey
[]
byte
)
error
{
self
.
lock
.
R
Lock
()
defer
self
.
lock
.
R
Unlock
()
self
.
lock
.
Lock
()
defer
self
.
lock
.
Unlock
()
delete
(
self
.
blacklist
,
string
(
pubkey
))
return
nil
}
rpc/args.go
View file @
c924a841
...
...
@@ -43,7 +43,7 @@ type PushTxArgs struct {
func
(
obj
*
PushTxArgs
)
UnmarshalJSON
(
b
[]
byte
)
(
err
error
)
{
arg0
:=
""
if
err
=
json
.
Unmarshal
(
b
,
arg0
);
err
==
nil
{
if
err
=
json
.
Unmarshal
(
b
,
&
arg0
);
err
==
nil
{
obj
.
Tx
=
arg0
return
}
...
...
@@ -82,7 +82,7 @@ type GetStateArgs struct {
func
(
obj
*
GetStateArgs
)
UnmarshalJSON
(
b
[]
byte
)
(
err
error
)
{
arg0
:=
""
if
err
=
json
.
Unmarshal
(
b
,
arg0
);
err
==
nil
{
if
err
=
json
.
Unmarshal
(
b
,
&
arg0
);
err
==
nil
{
obj
.
Address
=
arg0
return
}
...
...
@@ -114,7 +114,7 @@ type GetTxCountArgs struct {
func
(
obj
*
GetTxCountArgs
)
UnmarshalJSON
(
b
[]
byte
)
(
err
error
)
{
arg0
:=
""
if
err
=
json
.
Unmarshal
(
b
,
arg0
);
err
==
nil
{
if
err
=
json
.
Unmarshal
(
b
,
&
arg0
);
err
==
nil
{
obj
.
Address
=
arg0
return
}
...
...
rpc/http/server.go
View file @
c924a841
...
...
@@ -30,7 +30,7 @@ var rpchttplogger = logger.NewLogger("RPC-HTTP")
var
JSON
rpc
.
JsonWrapper
func
NewRpcHttpServer
(
pipe
*
xeth
.
XEth
,
port
int
)
(
*
RpcHttpServer
,
error
)
{
sport
:=
fmt
.
Sprintf
(
":%d"
,
port
)
sport
:=
fmt
.
Sprintf
(
"
127.0.0.1
:%d"
,
port
)
l
,
err
:=
net
.
Listen
(
"tcp"
,
sport
)
if
err
!=
nil
{
return
nil
,
err
...
...
rpc/packages.go
View file @
c924a841
...
...
@@ -109,8 +109,8 @@ func (self *EthereumApi) NewFilterString(args string, reply *interface{}) error
}
func
(
self
*
EthereumApi
)
FilterChanged
(
id
int
,
reply
*
interface
{})
error
{
self
.
logMut
.
R
Lock
()
defer
self
.
logMut
.
R
Unlock
()
self
.
logMut
.
Lock
()
defer
self
.
logMut
.
Unlock
()
*
reply
=
toLogs
(
self
.
logs
[
id
])
...
...
@@ -309,8 +309,8 @@ func (p *EthereumApi) NewWhisperFilter(args *xeth.Options, reply *interface{}) e
}
func
(
self
*
EthereumApi
)
MessagesChanged
(
id
int
,
reply
*
interface
{})
error
{
self
.
messagesMut
.
R
Lock
()
defer
self
.
messagesMut
.
R
Unlock
()
self
.
messagesMut
.
Lock
()
defer
self
.
messagesMut
.
Unlock
()
*
reply
=
self
.
messages
[
id
]
...
...
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