It allows to avoid redundant prefix splits
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
| ... | ... |
@@ -13,6 +13,12 @@ var ( |
| 13 | 13 |
ErrNoID = errors.New("prefix can't be empty")
|
| 14 | 14 |
) |
| 15 | 15 |
|
| 16 |
+func init() {
|
|
| 17 |
+ // Change patricia max prefix per node length, |
|
| 18 |
+ // because our len(ID) always 64 |
|
| 19 |
+ patricia.MaxPrefixPerNode = 64 |
|
| 20 |
+} |
|
| 21 |
+ |
|
| 16 | 22 |
// TruncIndex allows the retrieval of string identifiers by any of their unique prefixes. |
| 17 | 23 |
// This is used to retrieve image and container IDs by more convenient shorthand prefixes. |
| 18 | 24 |
type TruncIndex struct {
|