Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "readwire" interface to *some* Graphene Types. #65

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

jhtitor
Copy link
Contributor

@jhtitor jhtitor commented Apr 7, 2018

This is useful when you want to read the serialized wire protocol back into objects-in-memory. Although this is rarely used on the client side of graphene networks, at least one particular use case (BitShares blind transfers) exists.

To clarify: this is __bytes__ method in reverse.

The _readwire interface and method signature are pretty horrid, so some redesign might be required.

This is useful when you want to *read* the serialized
wire protocol back into objects-in-memory. Although this
is rarely used on the client side of graphene networks,
at least one particular use case (BitShares blind transfers)
exists.

To clarify: this is __bytes__ method in reverse.

The `_readwire` interface and method signature are
pretty horrid, so some redesign might be required.
@codecov-io
Copy link

codecov-io commented Apr 7, 2018

Codecov Report

Merging #65 into develop will decrease coverage by 0.34%.
The diff coverage is 87.3%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #65      +/-   ##
===========================================
- Coverage    98.69%   98.34%   -0.35%     
===========================================
  Files           24       24              
  Lines         1452     1515      +63     
  Branches       130      135       +5     
===========================================
+ Hits          1433     1490      +57     
- Misses          16       19       +3     
- Partials         3        6       +3
Impacted Files Coverage Δ
graphenebase/account.py 97.77% <100%> (+0.05%) ⬆️
graphenebase/types.py 96.46% <86.2%> (-2.65%) ⬇️
graphenestorage/masterpassword.py 100% <0%> (+2.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49c196e...5be5038. Read the comment docs.

@xeroc
Copy link
Owner

xeroc commented Apr 16, 2018

Would it be possible to add unit tests for those?

@xeroc
Copy link
Owner

xeroc commented Aug 9, 2018

Instead of calling those methods _rewrite, can we have them fromBytes() and not begin with _. That makes it more obvious and corresponds better with the fromBuffer used in bitsharesJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants