• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: 提交

Golang implemented sidechain for Bytom


Commit MetaInfo

修订版f2fd7c3f11e9b35bf753eda4dcd46ca435cc6ca3 (tree)
时间2019-11-25 11:03:47
作者paladz <453256728@qq.c...>
Commiterpaladz

Log Message

submit tx protocol verify

更改概述

差异

--- a/protocol/tx.go
+++ b/protocol/tx.go
@@ -49,6 +49,14 @@ func (c *Chain) validateTx(tx *types.Tx, bh *types.BlockHeader) (bool, error) {
4949 return false, err
5050 }
5151
52+ txVerifyResult := &bc.TxVerifyResult{StatusFail: err != nil}
53+ for _, p := range c.subProtocols {
54+ if err := p.ValidateTx(tx, txVerifyResult); err != nil {
55+ c.txPool.AddErrCache(&tx.ID, err)
56+ return false, err
57+ }
58+ }
59+
5260 if err != nil {
5361 log.WithFields(log.Fields{"module": logModule, "tx_id": tx.Tx.ID.String(), "error": err}).Info("transaction status fail")
5462 }
Show on old repository browser