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

Method GetTxnPool

consensus/actor/actor.go:40–50  ·  view source on GitHub ↗
(byCount bool, height uint32)

Source from the content-addressed store, hash-verified

38}
39
40func (self *TxPoolActor) GetTxnPool(byCount bool, height uint32) []*txpool.TXEntry {
41 poolmsg := &txpool.GetTxnPoolReq{ByCount: byCount, Height: height}
42 future := self.Pool.RequestFuture(poolmsg, time.Second*10)
43 entry, err := future.Result()
44 if err != nil {
45 return nil
46 }
47
48 txs := entry.(*txpool.GetTxnPoolRsp).TxnPool
49 return txs
50}
51
52func (self *TxPoolActor) VerifyBlock(txs []*types.Transaction, height uint32) error {
53 poolmsg := &txpool.VerifyBlockReq{Txs: txs, Height: height}

Callers 4

TimeoutMethod · 0.80
processTimerEventMethod · 0.80
makeProposalMethod · 0.80
makeBlockMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected