| 159 | } |
| 160 | |
| 161 | bytes rlp256(BytesMap const& _s) |
| 162 | { |
| 163 | // build patricia tree. |
| 164 | if (_s.empty()) |
| 165 | return rlp(""); |
| 166 | HexMap hexMap; |
| 167 | for (auto i = _s.rbegin(); i != _s.rend(); ++i) |
| 168 | hexMap[asNibbles(bytesConstRef(&i->first))] = i->second; |
| 169 | RLPStream s; |
| 170 | hash256rlp(hexMap, hexMap.cbegin(), hexMap.cend(), 0, s); |
| 171 | return s.out(); |
| 172 | } |
| 173 | |
| 174 | h256 hash256(BytesMap const& _s) |
| 175 | { |