Remove partial key size limit from trie codec (#12566)

* remove size limit from trie codec

* test previous upper limit is not enforced anymore

* fmt

* restore test
This commit is contained in:
cheme
2022-11-08 21:24:54 +01:00
committed by GitHub
parent 78cddd7631
commit 8b2ca711b3
4 changed files with 17 additions and 9 deletions
@@ -279,8 +279,6 @@ fn partial_from_iterator_encode<I: Iterator<Item = u8>>(
nibble_count: usize,
node_kind: NodeKind,
) -> Vec<u8> {
let nibble_count = sp_std::cmp::min(trie_constants::NIBBLE_SIZE_BOUND, nibble_count);
let mut output = Vec::with_capacity(4 + (nibble_count / nibble_ops::NIBBLE_PER_BYTE));
match node_kind {
NodeKind::Leaf => NodeHeader::Leaf(nibble_count).encode_to(&mut output),