You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
abitmore opened this issue
Apr 10, 2020
· 2 comments
Labels
3d BugClassification indicating the existing implementation does not match the intention of the design6 APIImpact flag identifying the application programing interface (API)
Due to #1903 and related code changes, the error messages returned by the APIs are less clear than before. The error message or data need to include the value of the configured limit, otherwise the clients won't know what the limit is.
Sample response produced by old versions (with info that the limit parameter should be <= 1000):
Impacts
Describe which portion(s) of BitShares Core 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, Travis, etc.)
DEX (the Decentralized EXchange, market engine, 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)
CORE TEAM TASK LIST
Evaluate / Prioritize Bug Report
Refine User Stories / Requirements
Define Test Cases
Design / Develop Solution
Perform QA/Testing
Update Documentation
The text was updated successfully, but these errors were encountered:
abitmore
added
3d Bug
Classification indicating the existing implementation does not match the intention of the design
6 API
Impact flag identifying the application programing interface (API)
labels
Apr 10, 2020
The app_options parameter of database_api constructor was initially designed to be optional. When omitted, nullptr will be stored in the implementation class. At that time, the code always checks whether the stored pointer is nullptr when trying to dereference the pointer.
However, it has changed at some time point. In current code base, the pointer is dereferenced at many places without a nullptr check, specifically, mostly the code about configurable API limits. The related test cases all construct database_api objects with an explicit non-null app_options parameter.
We need to fix it, either by requiring the parameter to be non-null and non-optional (which means to change quite some code), or always checking if it's nullptr (which means to change quite some other code). Update: I've decided to go with the 2nd approach.
3d BugClassification indicating the existing implementation does not match the intention of the design6 APIImpact flag identifying the application programing interface (API)
Bug Description
Due to #1903 and related code changes, the error messages returned by the APIs are less clear than before. The error message or data need to include the value of the configured limit, otherwise the clients won't know what the limit is.
Sample response produced by old versions (with info that the
limit
parameter should be <= 1000):Sample response produced by current code in
release
branch (with no info about what the limit should be):All similar APIs need to be fixed.
Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.
CORE TEAM TASK LIST
The text was updated successfully, but these errors were encountered: