ApeWorX / ApeWorX/py-trie

Remove prune flag as an external API

Đang mở
#94 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
111
Fork
54
Merge trung bình
27 phút
Pull request đã merge (30 ngày)
1

Mô tả

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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.