remove debug code

pull/1806/head
Rongjian Lan 5 years ago
parent 8e5a5237a2
commit 6dbfcf1d65
  1. 14
      core/tx_pool.go
  2. 4
      node/node_newblock.go

@ -306,20 +306,6 @@ func (pool *TxPool) loop() {
} }
pool.reset(head.Header(), ev.Block.Header()) pool.reset(head.Header(), ev.Block.Header())
head = ev.Block head = ev.Block
// DEBUG-
pending, queued := pool.stats()
stales := pool.priced.stales
if pending != prevPending || queued != prevQueued || stales != prevStales {
utils.Logger().Debug().
Int("executable", pending).
Int("queued", queued).
Int("stales", stales).
Msg("Transaction pool status report")
prevPending, prevQueued, prevStales = pending, queued, stales
}
// -
pool.mu.Unlock() pool.mu.Unlock()
} }
// Be unsubscribed due to system stopped // Be unsubscribed due to system stopped

@ -82,7 +82,6 @@ func (node *Node) proposeNewBlock() (*types.Block, error) {
// Update worker's current header and state data in preparation to propose/process new transactions // Update worker's current header and state data in preparation to propose/process new transactions
coinbase := node.Consensus.SelfAddress coinbase := node.Consensus.SelfAddress
utils.Logger().Info().Msg("11111111111")
// Prepare transactions including staking transactions\ // Prepare transactions including staking transactions\
pending, err := node.TxPool.Pending() pending, err := node.TxPool.Pending()
if err != nil { if err != nil {
@ -90,13 +89,13 @@ func (node *Node) proposeNewBlock() (*types.Block, error) {
return nil, err return nil, err
} }
utils.Logger().Info().Msg("222222222222")
// TODO: integrate staking transaction into tx pool // TODO: integrate staking transaction into tx pool
pendingStakingTransactions := types2.StakingTransactions{} pendingStakingTransactions := types2.StakingTransactions{}
for _, tx := range node.pendingStakingTransactions { for _, tx := range node.pendingStakingTransactions {
pendingStakingTransactions = append(pendingStakingTransactions, tx) pendingStakingTransactions = append(pendingStakingTransactions, tx)
} }
node.Worker.UpdateCurrent(coinbase)
if err := node.Worker.CommitTransactions(pending, pendingStakingTransactions, coinbase); err != nil { if err := node.Worker.CommitTransactions(pending, pendingStakingTransactions, coinbase); err != nil {
ctxerror.Log15(utils.GetLogger().Error, ctxerror.Log15(utils.GetLogger().Error,
ctxerror.New("cannot commit transactions"). ctxerror.New("cannot commit transactions").
@ -104,7 +103,6 @@ func (node *Node) proposeNewBlock() (*types.Block, error) {
return nil, err return nil, err
} }
utils.Logger().Info().Msg("33333333333333")
// Prepare cross shard transaction receipts // Prepare cross shard transaction receipts
receiptsList := node.proposeReceiptsProof() receiptsList := node.proposeReceiptsProof()
if len(receiptsList) != 0 { if len(receiptsList) != 0 {

Loading…
Cancel
Save