python-graphenelib
python-graphenelib copied to clipboard
Add "readwire" interface to *some* Graphene Types.
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 Report
Merging #65 into develop will decrease coverage by
0.34%. The diff coverage is87.3%.
@@ 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%) |
:arrow_up: |
| graphenebase/types.py | 96.46% <86.2%> (-2.65%) |
:arrow_down: |
| graphenestorage/masterpassword.py | 100% <0%> (+2.43%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 49c196e...5be5038. Read the comment docs.
Would it be possible to add unit tests for those?
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