Log invalid transactions discarded before creating each new block

pull/75/head
Rongjian Lan 6 years ago
parent 891bbf2a61
commit cd9a17eaa4
  1. 2
      node/node.go

@ -66,6 +66,8 @@ func (node *Node) getTransactionsForNewBlock(maxNumTxs int) ([]*blockchain.Trans
node.pendingTxMutex.Lock() node.pendingTxMutex.Lock()
selected, unselected, invalid, crossShardTxs := node.UtxoPool.SelectTransactionsForNewBlock(node.pendingTransactions, maxNumTxs) selected, unselected, invalid, crossShardTxs := node.UtxoPool.SelectTransactionsForNewBlock(node.pendingTransactions, maxNumTxs)
_ = invalid // invalid txs are discard _ = invalid // invalid txs are discard
node.log.Debug("Invalid transactions discarded", "number", len(invalid))
node.pendingTransactions = unselected node.pendingTransactions = unselected
node.pendingTxMutex.Unlock() node.pendingTxMutex.Unlock()
return selected, crossShardTxs return selected, crossShardTxs

Loading…
Cancel
Save