proc/worker/agent.go
func (w *Worker) AgentAfterOfferingPopUp(job *data.Job) error {
	logger := w.logger.Add("method", "AgentAfterOfferingPopUp", "job", job)

	ethLog, err := w.ethLog(logger, job)
	if err != nil {
		return err
	}

	logger = logger.Add("ethLog", ethLog)

	logOfferingPopUp, err := extractLogOfferingPopUp(logger, ethLog)
	if err != nil {
		return err
	}

	offering := data.Offering{}
	hash := data.HexFromBytes(logOfferingPopUp.offeringHash.Bytes())
	err = w.db.FindOneTo(&offering, "hash", hash)
	if err != nil {
		logger.Error(err.Error())
		return ErrInternal
	}

	offering.BlockNumberUpdated = ethLog.Block
	offering.Status = data.OfferPoppedUp

	return w.saveRecord(logger, w.db.Querier, &offering)
}
func (w *Worker) AgentAfterOfferingPopUp(job *data.Job) error {
	logger := w.logger.Add("method", "AgentAfterOfferingPopUp", "job", job)

	ethLog, err := w.ethLog(logger, job)
	if err != nil {
		return err
	}

	logger = logger.Add("ethLog", ethLog)

	logOfferingPopUp, err := extractLogOfferingPopUp(logger, ethLog)
	if err != nil {
		return err
	}

	offering := data.Offering{}
	hash := data.HexFromBytes(logOfferingPopUp.offeringHash.Bytes())
	err = w.db.FindOneTo(&offering, "hash", hash)
	if err != nil {
		logger.Error(err.Error())
		return ErrInternal
	}

	offering.BlockNumberUpdated = ethLog.Block
	offering.Status = data.OfferPoppedUp

	return w.saveRecord(logger, w.db.Querier, &offering)
}
func ( w * Worker ) AgentAfterOfferingPopUp ( job * data . Job ) error { logger := w . logger . Add ( " " , " " , " " , job ) ethLog , err := w . ethLog ( logger , job ) if err != nil { return err } logger = logger . Add ( " " , ethLog ) logOfferingPopUp , err := extractLogOfferingPopUp ( logger , ethLog ) if err != nil { return err } offering := data . Offering { } hash := data . HexFromBytes ( logOfferingPopUp . offeringHash . Bytes ( ) ) err = w . db . FindOneTo ( & offering , " " , hash ) if err != nil { logger . Error ( err . Error ( ) ) return ErrInternal } offering . BlockNumberUpdated = ethLog . Block offering . Status = data . OfferPoppedUp return w . saveRecord ( logger , w . db . Querier , & offering ) }
// AgentAfterOfferingPopUp updates the block number
// when the offering was updated.
AgentAfterOfferingPopUp updates the block number when the offering was updated .