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
38b4dc2c
Commit
38b4dc2c
authored
May 20, 2014
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21 from nicksavers/patch-1
Rearrange transaction RLP encoding...
parents
fafdd21e
530ab6b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
transaction.go
ethchain/transaction.go
+7
-7
No files found.
ethchain/transaction.go
View file @
38b4dc2c
...
...
@@ -109,10 +109,10 @@ func (tx *Transaction) Sign(privk []byte) error {
return
nil
}
// [ NONCE,
VALUE, GASPRICE, GAS, TO
, DATA, V, R, S ]
// [ NONCE,
VALUE, GASPRICE, GAS, 0
, CODE, INIT, V, R, S ]
// [ NONCE,
GASPRICE, GAS, TO, VALUE
, DATA, V, R, S ]
// [ NONCE,
GASPRICE, GAS, 0, VALUE
, CODE, INIT, V, R, S ]
func
(
tx
*
Transaction
)
RlpData
()
interface
{}
{
data
:=
[]
interface
{}{
tx
.
Nonce
,
tx
.
Value
,
tx
.
GasPrice
,
tx
.
Gas
,
tx
.
Recipient
,
tx
.
Data
}
data
:=
[]
interface
{}{
tx
.
Nonce
,
tx
.
GasPrice
,
tx
.
Gas
,
tx
.
Recipient
,
tx
.
Value
,
tx
.
Data
}
if
tx
.
contractCreation
{
data
=
append
(
data
,
tx
.
Init
)
...
...
@@ -135,10 +135,10 @@ func (tx *Transaction) RlpDecode(data []byte) {
func
(
tx
*
Transaction
)
RlpValueDecode
(
decoder
*
ethutil
.
Value
)
{
tx
.
Nonce
=
decoder
.
Get
(
0
)
.
Uint
()
tx
.
Valu
e
=
decoder
.
Get
(
1
)
.
BigInt
()
tx
.
Gas
Price
=
decoder
.
Get
(
2
)
.
BigInt
()
tx
.
Gas
=
decoder
.
Get
(
3
)
.
BigInt
()
tx
.
Recipient
=
decoder
.
Get
(
4
)
.
Bytes
()
tx
.
GasPric
e
=
decoder
.
Get
(
1
)
.
BigInt
()
tx
.
Gas
=
decoder
.
Get
(
2
)
.
BigInt
()
tx
.
Recipient
=
decoder
.
Get
(
3
)
.
Bytes
()
tx
.
Value
=
decoder
.
Get
(
4
)
.
BigInt
()
tx
.
Data
=
decoder
.
Get
(
5
)
.
Bytes
()
// If the list is of length 10 it's a contract creation tx
...
...
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