forked from Chia-Network/chia-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve streamable (Chia-Network#3031)
* Avoid importing `test_constants` as it takes a long time. * Factor out `parse_*` functions. * First crack at refactoring `Streamable.parse`. * Don't add `_parse_functions` attribute to `Streamable`. This no longer requires an extra `_parse_functions` attribute on a `Streamable`, as it may be confusing serializers or other functions that use `__annotations__`. * Fix lint problems with `black`. * Fix `parse_tuple`. * Defer some parsing failures to parse time rather than class-creation time. * Tidy up & remove some obsolete stuff. * Decorate `RequestBlocks` as `streamable`. * Fix wrong uses of Streamable class Revert an earlier commit and error out on class creation in case a Streamable subclass is instantiated incorrectly, e.g. containing a non-serializable member. Fix cases where Streamable parent class was forgotten. * Fix wrong types when creating DerivationRecord and WalletCoinRecord * additional unit tests for streamable parsers * add type annotations (Chia-Network#3222) Co-authored-by: Rostislav <[email protected]> Co-authored-by: arvidn <[email protected]>
- Loading branch information
1 parent
9779286
commit b084813
Showing
13 changed files
with
321 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.