• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: 提交

Golang implemented sidechain for Bytom


Commit MetaInfo

修订版5f0b01c34a5bcfc5be487c3403366febc39dcbf8 (tree)
时间2019-12-06 16:57:34
作者shenao78 <shenao.78@163....>
Commitershenao78

Log Message

fix ci

更改概述

差异

--- a/application/mov/mov_core.go
+++ b/application/mov/mov_core.go
@@ -80,12 +80,12 @@ func (m *MovCore) BeforeProposalBlock(txs []*types.Tx, nodeProgram []byte, block
8080 return nil, nil
8181 }
8282
83- orderTable, err := buildOrderTable(m.movStore, txs)
83+ orderBook, err := buildOrderBook(m.movStore, txs)
8484 if err != nil {
8585 return nil, err
8686 }
8787
88- matchEngine := match.NewEngine(orderTable, maxFeeRate, nodeProgram)
88+ matchEngine := match.NewEngine(orderBook, maxFeeRate, nodeProgram)
8989 tradePairMap := make(map[string]bool)
9090 tradePairIterator := database.NewTradePairIterator(m.movStore)
9191
@@ -291,12 +291,12 @@ func validateMatchedTxFeeAmount(tx *types.Tx) error {
291291 @issue: the match package didn't support circle yet
292292 */
293293 func (m *MovCore) validateMatchedTxSequence(txs []*types.Tx) error {
294- orderTable, err := buildOrderTable(m.movStore, txs)
294+ orderBook, err := buildOrderBook(m.movStore, txs)
295295 if err != nil {
296296 return err
297297 }
298298
299- matchEngine := match.NewEngine(orderTable, maxFeeRate, nil)
299+ matchEngine := match.NewEngine(orderBook, maxFeeRate, nil)
300300 for _, matchedTx := range txs {
301301 if !common.IsMatchedTx(matchedTx) {
302302 continue
@@ -370,7 +370,7 @@ func applyTransactions(txs []*types.Tx) ([]*common.Order, []*common.Order, error
370370 /*
371371 @issue: if consensus node packed match transaction first then packed regular tx, this function's logic may make a valid block invalid
372372 */
373-func buildOrderTable(store database.MovStore, txs []*types.Tx) (*match.OrderTable, error) {
373+func buildOrderBook(store database.MovStore, txs []*types.Tx) (*match.OrderBook, error) {
374374 var nonMatchedTxs []*types.Tx
375375 for _, tx := range txs {
376376 if !common.IsMatchedTx(tx) {
@@ -394,7 +394,7 @@ func buildOrderTable(store database.MovStore, txs []*types.Tx) (*match.OrderTabl
394394 arrivalDelOrders = append(arrivalDelOrders, delOrders...)
395395 }
396396
397- return match.NewOrderTable(store, arrivalAddOrders, arrivalDelOrders), nil
397+ return match.NewOrderBook(store, arrivalAddOrders, arrivalDelOrders), nil
398398 }
399399
400400 func calcMatchedTxGasUsed(tx *types.Tx) int64 {
Show on old repository browser