8 "github.com/bytom/net/http/reqid"
11 // POST /create-account-receiver
12 func (a *BlockchainReactor) createAccountReceiver(ctx context.Context, ins []struct {
13 AccountID string `json:"account_id"`
14 AccountAlias string `json:"account_alias"`
15 ExpiresAt time.Time `json:"expires_at"`
17 responses := make([]interface{}, len(ins))
19 wg.Add(len(responses))
21 for i := 0; i < len(responses); i++ {
23 subctx := reqid.NewSubContext(ctx, reqid.New())
25 defer batchRecover(subctx, &responses[i])
27 receiver, err := a.accounts.CreateReceiver(subctx, ins[i].AccountID, ins[i].AccountAlias, ins[i].ExpiresAt)
31 responses[i] = receiver