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
ae2c90cc
Commit
ae2c90cc
authored
Jan 02, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed value check from tx validation
parent
6cf61039
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
transaction_pool.go
core/transaction_pool.go
+6
-2
No files found.
core/transaction_pool.go
View file @
ae2c90cc
...
...
@@ -2,7 +2,6 @@ package core
import
(
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
...
...
@@ -73,7 +72,7 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error {
v
,
_
,
_
:=
tx
.
Curve
()
if
v
>
28
||
v
<
27
{
return
fmt
.
Errorf
(
"tx.v != (28 || 27)
"
)
return
fmt
.
Errorf
(
"tx.v != (28 || 27)
=> %v"
,
v
)
}
// Get the sender
...
...
@@ -83,12 +82,17 @@ func (pool *TxPool) ValidateTransaction(tx *types.Transaction) error {
}
sender
:=
pool
.
stateQuery
.
GetAccount
(
senderAddr
)
/* XXX this kind of validation needs to happen elsewhere in the gui when sending txs.
Other clients should do their own validation. Value transfer could be throw error
but doesn't necessarily invalidate the tx. Gas can still be payed for and miner
can still be rewarded for their inclusion and processing.
totAmount := new(big.Int).Set(tx.Value())
// Make sure there's enough in the sender's account. Having insufficient
// funds won't invalidate this transaction but simple ignores it.
if sender.Balance().Cmp(totAmount) < 0 {
return fmt.Errorf("Insufficient amount in sender's (%x) account", tx.From())
}
*/
return
nil
}
...
...
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