// StoreResult stores the retrieved data in local database
777042
func (req *ReceiptsRequest) StoreResult(db ethdb.Database) {
	rawdb.WriteReceipts(db, req.Hash, req.Number, req.Receipts)
}
1082319
func (m *resolversMap) Store(key string, value resolver.Resolver) {
	m.data.Store(key, value)
}
1297244
func (f *Future) HasResult() bool {
	f.lock.Lock()
	hasResult := f.triggered
	f.lock.Unlock()
	return hasResult
}
648658
func NewResult(intersectionType Type, intersection []geom.Coord) Result {
	return Result{
		intersectionType: intersectionType,
		intersection:     intersection,
	}
}
780140
func (c *AppversionListCall) EventResult(eventResult string) *AppversionListCall {
	c.urlParams_.Set("eventResult", eventResult)
	return c
}
1087797
func CollectResult(ctx context.Context, gcOut <-chan gc.Result, cb func(cid.Cid)) error {
	var errors []error
loop:
	for {
		select {
		case res, ok := <-gcOut:
			if !ok {
				break loop
			}
			if res.Error != nil {
				errors = append(errors, res.Error)
			} else if res.KeyRemoved.Defined() && cb != nil {
				cb(res.KeyRemoved)
			}
		case <-ctx.Done():
			errors = append(errors, ctx.Err())
			break loop
		}
	}

	switch len(errors) {
	case 0:
		return nil
	case 1:
		return errors[0]
	default:
		return NewMultiError(errors...)
	}
}
1064735
func (s *RespondActivityTaskCompletedInput) SetResult(v string) *RespondActivityTaskCompletedInput {
	s.Result = &v
	return s
}
352543
func (c *ClientupdateCountCall) EventResult(eventResult string) *ClientupdateCountCall {
	c.urlParams_.Set("eventResult", eventResult)
	return c
}
537386
func (s *TasksService) FindResult(t TaskID) (*http.Response, error) {
	return s.client.GetResultByURI(t.ResultURI())
}
668906
func (req *TrieRequest) StoreResult(db ethdb.Database) {
	req.Proof.Store(db)
}
306453
func (jst *Tracer) GetResult() (json.RawMessage, error) {
	// Transform the context into a JavaScript object and inject into the state
	obj := jst.vm.PushObject()

	for key, val := range jst.ctx {
		switch val := val.(type) {
		case uint64:
			jst.vm.PushUint(uint(val))

		case string:
			jst.vm.PushString(val)

		case []byte:
			ptr := jst.vm.PushFixedBuffer(len(val))
			copy(makeSlice(ptr, uint(len(val))), val)

		case common.Address:
			ptr := jst.vm.PushFixedBuffer(20)
			copy(makeSlice(ptr, 20), val[:])

		case *big.Int:
			pushBigInt(val, jst.vm)

		default:
			panic(fmt.Sprintf("unsupported type: %T", val))
		}
		jst.vm.PutPropString(obj, key)
	}
	jst.vm.PutPropString(jst.stateObject, "ctx")

	// Finalize the trace and return the results
	result, err := jst.call("result", "ctx", "db")
	if err != nil {
		jst.err = wrapError("result", err)
	}
	// Clean up the JavaScript environment
	jst.vm.DestroyHeap()
	jst.vm.Destroy()

	return result, jst.err
}
282191
func NewResult(operation Operation, result Result, errMsg ...string) *OperationResult {
	msg := ""
	if len(errMsg) > 0 {
		msg = errMsg[0]
	}
	return &OperationResult{
		Operation:  operation,
		Result:     result,
		ErrMessage: msg,
	}
}
837831
func NewResult(version string, resultBytes []byte) (types.Result, error) {
	reconciler := &Reconciler{}
	for _, resultFactory := range resultFactories {
		err := reconciler.CheckRaw(version, resultFactory.supportedVersions)
		if err == nil {
			// Result supports this version
			return resultFactory.newResult(resultBytes)
		}
	}

	return nil, fmt.Errorf("unsupported CNI result version %q", version)
}
57026
func (a ABCIResults) ProveResult(i int) merkle.SimpleProof {
	_, proofs := merkle.SimpleProofsFromByteSlices(a.toByteSlices())
	return *proofs[i]
}
259437
func (s *ActivityTaskCompletedEventAttributes) SetResult(v string) *ActivityTaskCompletedEventAttributes {
	s.Result = &v
	return s
}
732308
func (b *AMQPCeleryBackend) SetResult(taskID string, result *ResultMessage) error {

	result.ID = taskID

	//queueName := taskID
	queueName := strings.Replace(taskID, "-", "", -1)

	// autodelete is automatically set to true by python
	// (406) PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'bc58c0d895c7421eb7cb2b9bbbd8b36f' in vhost '/': received 'true' but current is 'false'

	args := amqp.Table{"x-expires": int32(86400000)}
	_, err := b.QueueDeclare(
		queueName, // name
		true,      // durable
		true,      // autoDelete
		false,     // exclusive
		false,     // noWait
		args,      // args
	)
	if err != nil {
		return err
	}

	err = b.ExchangeDeclare(
		"default",
		"direct",
		true,
		true,
		false,
		false,
		nil,
	)
	if err != nil {
		return err
	}

	resBytes, err := json.Marshal(result)
	if err != nil {
		return err
	}

	message := amqp.Publishing{
		DeliveryMode: amqp.Persistent,
		Timestamp:    time.Now(),
		ContentType:  "application/json",
		Body:         resBytes,
	}
	return b.Publish(
		"",
		queueName,
		false,
		false,
		message,
	)
}
1252965
func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) {
	if f.pt.finalGetURL() == "" {
		// we can end up in this situation if the async operation returns a 200
		// with no polling URLs.  in that case return the response which should
		// contain the JSON payload (only do this for successful terminal cases).
		if lr := f.pt.latestResponse(); lr != nil && f.pt.hasSucceeded() {
			return lr, nil
		}
		return nil, autorest.NewError("Future", "GetResult", "missing URL for retrieving result")
	}
	req, err := http.NewRequest(http.MethodGet, f.pt.finalGetURL(), nil)
	if err != nil {
		return nil, err
	}
	return sender.Do(req)
}