Example #1
0
 bool filter( const action_trace& act ) {
    if( filter_on.size() == 0 ) return true;
    if( is_filtered( act.receipt.receiver ) ) return true;
    for( const auto& a : act.act.authorization ) {
       if( is_filtered(  a.actor ) ) return true;
    }
    return false;
 }
Example #2
0
         set<account_name> account_set( const action_trace& act ) {
            set<account_name> result;

            if( is_filtered( act.receipt.receiver ) )
               result.insert( act.receipt.receiver );
            for( const auto& a : act.act.authorization ) {
               if( is_filtered(  a.actor ) ) result.insert( a.actor );
            }
            return result;
         }
Example #3
0
/**
 * @brief Packs an OPRA quote best bid message.
 */
void opra_msg_quote_bb_pack(FH_STATUS            *rc,
                            fh_opra_msg_quote_t  *om,
                            fh_opra_opt_t        *opt,
                            void                **msg,
                            int                  *len)
{
    if (!is_filtered(opt->opt_topic)) {
        FH_LOG(CSI, STATE, ("FH_PLUGIN_OPRA_BB_PACK called: data of length %d at 0x%x", *len, msg));
        FH_LOG(CSI, STATE, ("  header => { category => %c, type => %c, seq_no => %u }",
                            om->om_msg->hdr.category, om->om_msg->hdr.type,
                            om->om_msg->hdr.seqNumber));
        FH_LOG(CSI, STATE, ("  fh_opra_msg_bb_t => { symbol => '%.5s' }", om->om_msg->symbol));
        FH_LOG(CSI, STATE, ("  fh_opra_opt_t => { topic => '%s' }", opt->opt_topic));
    }
    *rc = FH_OK;
}
Example #4
0
/**
 * @brief Packs an OPRA quote message.
 */
void opra_msg_quote_pack(FH_STATUS            *rc,
                         fh_opra_msg_quote_t  *om,
                         fh_opra_opt_t        *opt,
                         void                **msg,
                         int                  *len)
{
    if (!is_filtered(opt->opt_topic)) {
        FH_LOG(CSI, STATE, ("FH_PLUGIN_OPRA_QUOTE_PACK called: data of length %d at 0x%x",
                            *len, msg));
        FH_LOG(CSI, STATE, ("  header => { category => %c, type => %c, seq_no => %u, "
                            "participant => %c }",
                            om->om_msg->hdr.category, om->om_msg->hdr.type,
                            om->om_msg->hdr.seqNumber, om->om_msg->hdr.participantId));
        FH_LOG(CSI, STATE, ("  fh_opra_msg_quote_t => { symbol => '%.5s', strikePricecode = %c, "
                            "explicitStrike = %u, strikePriceDenomCode = %c",
                            om->om_msg->symbol, om->om_msg->strikePriceCode,
                            om->om_msg->explicitStrike, om->om_msg->strikePriceDenomCode));
        FH_LOG(CSI, STATE, ("  fh_opra_opt_t => { topic => '%s' }", opt->opt_topic));
        *rc = FH_OK;
    }
}