Skip to content

[Easy] Implement notifications for Peerplays objects #373

Description

@nathanielhourt

Bug Description
In db_notify.cpp, there is a function, get_relevant_accounts() to get accounts related to any object type in the system. Several peerplays-specific types are not recognized by this function yet, and should be added. This allows the chain to determine which accounts are affected by a modified object and then enables front-ends to notify affected users of the event.

Modern compilers give a warning when processing this code which is helpful in determining which objects still need to be handled:

db_notify.cpp:314:15: warning: 9 enumeration values not handled in switch: 'sport_object_type', 'event_object_type', 'event_group_object_type'...
db_notify.cpp:388:15: warning: 10 enumeration values not handled in switch: 'impl_collateral_bid_object_type', 'impl_asset_dividend_data_object_type', 'impl_total_distributed_dividend_balance_object_type'...

Impacts
Describe which portion(s) of Peerplays may be impacted by this bug. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Gitlab, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

PBSA / Developer tasks

  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions