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
7e6684d9
Commit
7e6684d9
authored
Jun 19, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Method for checking contract addresses
parent
1b431f29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
transaction.go
ethchain/transaction.go
+5
-1
No files found.
ethchain/transaction.go
View file @
7e6684d9
...
@@ -10,6 +10,10 @@ import (
...
@@ -10,6 +10,10 @@ import (
var
ContractAddr
=
[]
byte
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
var
ContractAddr
=
[]
byte
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
func
IsContractAddr
(
addr
[]
byte
)
bool
{
return
bytes
.
Compare
(
addr
,
ContractAddr
)
==
0
}
type
Transaction
struct
{
type
Transaction
struct
{
Nonce
uint64
Nonce
uint64
Recipient
[]
byte
Recipient
[]
byte
...
@@ -149,7 +153,7 @@ func (tx *Transaction) RlpValueDecode(decoder *ethutil.Value) {
...
@@ -149,7 +153,7 @@ func (tx *Transaction) RlpValueDecode(decoder *ethutil.Value) {
tx
.
r
=
decoder
.
Get
(
7
)
.
Bytes
()
tx
.
r
=
decoder
.
Get
(
7
)
.
Bytes
()
tx
.
s
=
decoder
.
Get
(
8
)
.
Bytes
()
tx
.
s
=
decoder
.
Get
(
8
)
.
Bytes
()
if
bytes
.
Compare
(
tx
.
Recipient
,
ContractAddr
)
==
0
{
if
IsContractAddr
(
tx
.
Recipient
)
{
tx
.
contractCreation
=
true
tx
.
contractCreation
=
true
}
}
}
}
...
...
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