MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / extractTxs

Method extractTxs

worker/chainbusservice.go:221–227  ·  view source on GitHub ↗
(blocks *types.BPBlock, count uint32)

Source from the content-addressed store, hash-verified

219}
220
221func (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
229func (bs *BusService) unwrapTx(tx interfaces.Transaction) interfaces.Transaction {
230 switch t := tx.(type) {

Callers 2

subscribeBlockMethod · 0.95
TestNewBusServiceFunction · 0.95

Calls 4

unwrapTxMethod · 0.95
GetTransactionTypeMethod · 0.65
PublishMethod · 0.65
StringMethod · 0.45

Tested by 1

TestNewBusServiceFunction · 0.76