(blocks *types.BPBlock, count uint32)
| 219 | } |
| 220 | |
| 221 | func (bs *BusService) extractTxs(blocks *types.BPBlock, count uint32) { |
| 222 | for _, tx := range blocks.Transactions { |
| 223 | t := bs.unwrapTx(tx) |
| 224 | eventName := fmt.Sprintf("/%s/", t.GetTransactionType().String()) |
| 225 | bs.Publish(eventName, t, count) |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | func (bs *BusService) unwrapTx(tx interfaces.Transaction) interfaces.Transaction { |
| 230 | switch t := tx.(type) { |