bitshares-core icon indicating copy to clipboard operation
bitshares-core copied to clipboard

Refactor fc::fstream to be more like std::fstream

Open jmjatlanta opened this issue 6 years ago • 1 comments

User Story As a developer I want to use fc::fstream so that it works like most other fstream library classes/functions.

Impacts

  • [ ] 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)
  • [X] Other (please add below)

Additional Context (optional) fc::fstream had a deficiency that files could not be opened in append mode. See issue #809. As part of the research for that issue, it was found that the mode parameter does not work as one would expect after working with fstream of the standard library or boost. See https://github.com/bitshares/bitshares-core/issues/809#issuecomment-402428470.

Making fc::fstream compatible with std::fstream will require careful examination of all uses, to make sure they work the same as today. We may even find uses where they are expecting it to work like std::fstream but it is not.

CORE TEAM TASK LIST

  • [ ] Evaluate / Prioritize Feature Request
  • [ ] Refine User Stories / Requirements
  • [ ] Define Test Cases
  • [ ] Design / Develop Solution
  • [ ] Perform QA/Testing
  • [ ] Update Documentation

jmjatlanta avatar Jul 04 '18 15:07 jmjatlanta

Actually I think we should replace fc::fstream with std::fstream instead of modifying the former to behave like the latter.

pmconrad avatar Nov 07 '19 17:11 pmconrad