MCPcopy Create free account
hub / github.com/DNAProject/DNA / getTxPool

Method getTxPool

txnpool/proc/txnpool_server.go:498–509  ·  view source on GitHub ↗

getTxPool returns a tx list for consensus.

(byCount bool, height uint32)

Source from the content-addressed store, hash-verified

496
497// getTxPool returns a tx list for consensus.
498func (s *TXPoolServer) getTxPool(byCount bool, height uint32) []*tc.TXEntry {
499 s.setHeight(height)
500
501 avlTxList, oldTxList := s.txPool.GetTxPool(byCount, height)
502
503 for _, t := range oldTxList {
504 s.delTransaction(t)
505 s.reVerifyStateful(t, tc.NilSender)
506 }
507
508 return avlTxList
509}
510
511// getTxCount returns current tx count, including pending and verified
512func (s *TXPoolServer) getTxCount() []uint32 {

Callers 1

ReceiveMethod · 0.80

Calls 4

setHeightMethod · 0.95
delTransactionMethod · 0.95
reVerifyStatefulMethod · 0.95
GetTxPoolMethod · 0.80

Tested by

no test coverage detected