MCPcopy Create free account
hub / github.com/33cn/chain33 / send2MainChain

Method send2MainChain

client/queueprotocol.go:145–156  ·  view source on GitHub ↗
(cfg *types.Chain33Config, tx *types.Transaction)

Source from the content-addressed store, hash-verified

143}
144
145func (q *QueueProtocol) send2MainChain(cfg *types.Chain33Config, tx *types.Transaction) (*types.Reply, error) {
146
147 mainGrpc := grpcclient.GetDefaultMainClient()
148 if mainGrpc == nil {
149 var err error
150 mainGrpc, err = grpcclient.NewMainChainClient(cfg, "")
151 if err != nil {
152 return nil, err
153 }
154 }
155 return mainGrpc.SendTransaction(context.TODO(), tx)
156}
157
158// SendTx send transaction to mempool with forward logic in parachain
159func (q *QueueProtocol) SendTx(tx *types.Transaction) (*types.Reply, error) {

Callers 1

SendTxMethod · 0.95

Calls 3

GetDefaultMainClientFunction · 0.92
NewMainChainClientFunction · 0.92
SendTransactionMethod · 0.65

Tested by

no test coverage detected