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
b57a3f15
Commit
b57a3f15
authored
Feb 23, 2016
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2234 from obscuren/tx-rpc-fix
eth: fixed homestead tx check
parents
1f281dca
c616391d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
api.go
eth/api.go
+9
-9
No files found.
eth/api.go
View file @
b57a3f15
...
...
@@ -762,7 +762,7 @@ type RPCTransaction struct {
// newRPCPendingTransaction returns a pending transaction that will serialize to the RPC representation
func
newRPCPendingTransaction
(
tx
*
types
.
Transaction
)
*
RPCTransaction
{
from
,
_
:=
tx
.
From
()
from
,
_
:=
tx
.
From
Frontier
()
return
&
RPCTransaction
{
From
:
from
,
...
...
@@ -780,7 +780,7 @@ func newRPCPendingTransaction(tx *types.Transaction) *RPCTransaction {
func
newRPCTransactionFromBlockIndex
(
b
*
types
.
Block
,
txIndex
int
)
(
*
RPCTransaction
,
error
)
{
if
txIndex
>=
0
&&
txIndex
<
len
(
b
.
Transactions
())
{
tx
:=
b
.
Transactions
()[
txIndex
]
from
,
err
:=
tx
.
From
()
from
,
err
:=
tx
.
From
Frontier
()
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -970,7 +970,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(txHash common.Hash) (ma
return
nil
,
nil
}
from
,
err
:=
tx
.
From
()
from
,
err
:=
tx
.
From
Frontier
()
if
err
!=
nil
{
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"%v
\n
"
,
err
)
return
nil
,
nil
...
...
@@ -1084,7 +1084,7 @@ func (s *PublicTransactionPoolAPI) SendRawTransaction(encodedTx string) (string,
}
if
tx
.
To
()
==
nil
{
from
,
err
:=
tx
.
From
()
from
,
err
:=
tx
.
From
Frontier
()
if
err
!=
nil
{
return
""
,
err
}
...
...
@@ -1190,7 +1190,7 @@ type SignTransactionResult struct {
}
func
newTx
(
t
*
types
.
Transaction
)
*
Tx
{
from
,
_
:=
t
.
From
()
from
,
_
:=
t
.
From
Frontier
()
return
&
Tx
{
tx
:
t
,
To
:
t
.
To
(),
...
...
@@ -1263,7 +1263,7 @@ func (s *PublicTransactionPoolAPI) PendingTransactions() ([]*RPCTransaction, err
pending
:=
s
.
txPool
.
GetTransactions
()
transactions
:=
make
([]
*
RPCTransaction
,
0
)
for
_
,
tx
:=
range
pending
{
if
from
,
_
:=
tx
.
From
();
accountSet
.
Has
(
from
)
{
if
from
,
_
:=
tx
.
From
Frontier
();
accountSet
.
Has
(
from
)
{
transactions
=
append
(
transactions
,
newRPCPendingTransaction
(
tx
))
}
}
...
...
@@ -1298,7 +1298,7 @@ func (s *PublicTransactionPoolAPI) NewPendingTransactions() (rpc.Subscription, e
}
tx
:=
transaction
.
(
core
.
TxPreEvent
)
if
from
,
err
:=
tx
.
Tx
.
From
();
err
==
nil
{
if
from
,
err
:=
tx
.
Tx
.
From
Frontier
();
err
==
nil
{
if
accountSet
.
Has
(
from
)
{
return
tx
.
Tx
.
Hash
()
}
...
...
@@ -1315,7 +1315,7 @@ func (s *PublicTransactionPoolAPI) Resend(tx *Tx, gasPrice, gasLimit *rpc.HexNum
pending
:=
s
.
txPool
.
GetTransactions
()
for
_
,
p
:=
range
pending
{
if
pFrom
,
err
:=
p
.
From
();
err
==
nil
&&
pFrom
==
tx
.
From
&&
p
.
SigHash
()
==
tx
.
tx
.
SigHash
()
{
if
pFrom
,
err
:=
p
.
From
Frontier
();
err
==
nil
&&
pFrom
==
tx
.
From
&&
p
.
SigHash
()
==
tx
.
tx
.
SigHash
()
{
if
gasPrice
==
nil
{
gasPrice
=
rpc
.
NewHexNumber
(
tx
.
tx
.
GasPrice
())
}
...
...
@@ -1589,7 +1589,7 @@ func (s *PrivateDebugAPI) doReplayTransaction(txHash common.Hash) ([]vm.StructLo
return
nil
,
nil
,
nil
,
err
}
txFrom
,
err
:=
tx
.
From
()
txFrom
,
err
:=
tx
.
From
Frontier
()
if
err
!=
nil
{
return
nil
,
nil
,
nil
,
fmt
.
Errorf
(
"Unable to create transaction sender"
)
...
...
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