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

Method VerifyBlock

consensus/actor/actor.go:52–68  ·  view source on GitHub ↗
(txs []*types.Transaction, height uint32)

Source from the content-addressed store, hash-verified

50}
51
52func (self *TxPoolActor) VerifyBlock(txs []*types.Transaction, height uint32) error {
53 poolmsg := &txpool.VerifyBlockReq{Txs: txs, Height: height}
54 future := self.Pool.RequestFuture(poolmsg, time.Second*10)
55 entry, err := future.Result()
56 if err != nil {
57 return err
58 }
59
60 txentry := entry.(*txpool.VerifyBlockRsp).TxnPool
61 for _, entry := range txentry {
62 if entry.ErrCode != ontErrors.ErrNoError {
63 return errors.New(entry.ErrCode.Error())
64 }
65 }
66
67 return nil
68}
69
70type P2PActor struct {
71 P2P *actor.PID

Callers 2

processProposalMsgMethod · 0.80

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected