OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ca571f
)
Fix bug (#472)
author
ipqhjjybj
<250657661@qq.com>
Thu, 26 Dec 2019 06:02:49 +0000
(14:02 +0800)
committer
Paladz
<yzhu101@uottawa.ca>
Thu, 26 Dec 2019 06:02:49 +0000
(14:02 +0800)
* fix bug for vote & normal output
* 修复提交同样的错误交易时,放回成功的bug
Co-authored-by: Colt-Z <453256728@qq.com>
protocol/tx.go
patch
|
blob
|
history
diff --git
a/protocol/tx.go
b/protocol/tx.go
index
f863678
..
b5b4ec5
100644
(file)
--- a/
protocol/tx.go
+++ b/
protocol/tx.go
@@
-27,9
+27,12
@@
func (c *Chain) ValidateTx(tx *types.Tx) (bool, error) {
return false, nil
}
- c.markTransactions(tx)
bh := c.BestBlockHeader()
- return c.validateTx(tx, bh)
+ isOrphan, err := c.validateTx(tx, bh)
+ if err == nil {
+ c.markTransactions(tx)
+ }
+ return isOrphan, err
}
// validateTx validates the given transaction without checking duplication.