ApeWorX / ApeWorX/py-trie

Remove prune flag as an external API

Open
#94 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
111
Forks
54
Avg merge
27m
Merged PRs (30d)
1

Description

It's too easy to screw up handling of pruning when you use it directly. We should direct everyone to use the `squash_changes()` API instead. Let's remove the `prune` keyword from init, and add some internal-only API to enable pruning from within `squash_changes`.

It seems this needs to go into a major version bump

> It's possible that we might be able to hide away the `prune` keyword somehow and force `squash_changes` as the only approach to do that. I think we could cover both use cases that way, but I'm not sure how it would look to launch a pruning trie from inside `squash_changes()` (which uses the `prune` keyword internally right now).

_Originally posted by @carver in https://github.com/ethereum/py-trie/pull/93#issuecomment-524116152_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.