OSDN Git Service
(root)
/
bytom
/
bytom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daec65d
)
fix bug for err tx should not goes into txpool (#605)
author
Paladz
<yzhu101@uottawa.ca>
Thu, 12 Apr 2018 06:46:55 +0000
(14:46 +0800)
committer
GitHub
<noreply@github.com>
Thu, 12 Apr 2018 06:46:55 +0000
(14:46 +0800)
protocol/tx.go
patch
|
blob
|
history
diff --git
a/protocol/tx.go
b/protocol/tx.go
index
7322de1
..
f17c955
100644
(file)
--- a/
protocol/tx.go
+++ b/
protocol/tx.go
@@
-43,6
+43,7
@@
func (c *Chain) ValidateTx(tx *types.Tx) (bool, error) {
gasStatus, err := validation.ValidateTx(tx.Tx, block)
if gasStatus.GasVaild == false {
c.txPool.AddErrCache(&tx.ID, err)
+ return false, err
}
_, err = c.txPool.AddTransaction(tx, err != nil, block.BlockHeader.Height, gasStatus.BTMValue)