(txs []*types.Transaction, height uint32)
| 50 | } |
| 51 | |
| 52 | func (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 | |
| 70 | type P2PActor struct { |
| 71 | P2P *actor.PID |
no test coverage detected