 |
Ethereum
PoC-8
The C++ Implementation of Ethereum
|
Go to the documentation of this file.
33 return (_i & 1) ? (_data[_i / 2] & 15) : (_data[_i / 2] >> 4);
41 while (_beginFirst < _endFirst && _beginSecond < _endSecond &&
nibble(_first, _beginFirst) ==
nibble(_second, _beginSecond))
77 for (; i < _k.
size() && i <
size(); ++i)
78 if (
operator[](i) < _k[i])
80 else if (
operator[](i) > _k[i])
92 for (
unsigned i = 0; i < _m.
size(); ++i)
93 _out << std::hex << (
int)_m[i] << std::dec;
100 auto pl = _twoItem[0].
payload();
101 return (pl[0] & 0x20) != 0;
116 return keyOf(_twoItem[0].payload());
120 std::string
hexPrefixEncode(
bytes const& _hexVector,
bool _leaf =
false,
int _begin = 0,
int _end = -1);
unsigned sharedNibbles(bytesConstRef _first, unsigned _beginFirst, unsigned _endFirst, bytesConstRef _second, unsigned _beginSecond, unsigned _endSecond)
unsigned shared(NibbleSlice _k) const
byte operator[](unsigned _index) const
std::string hexPrefixEncode(bytes const &_hexVector, bool _leaf, int _begin, int _end)
byte uniqueInUse(RLP const &_orig, byte except)
byte nibble(bytesConstRef _data, unsigned _i)
bool isList() const
List value.
bool operator==(NibbleSlice _k) const
bool operator!=(NibbleSlice _s) const
std::ostream & operator<<(std::ostream &_out, bytes const &_e)
bool contains(NibbleSlice _k) const
NibbleSlice keyOf(bytesConstRef _hpe)
std::vector< byte > bytes
bool isEarlierThan(NibbleSlice _k) const
Determine if we, a full key, are situated prior to a particular key-prefix.
vector_ref< byte const > bytesConstRef
NibbleSlice(bytesConstRef _data=bytesConstRef(), unsigned _offset=0)
bytesConstRef payload() const
bool isLeaf(RLP const &_twoItem)
NibbleSlice mid(unsigned _index) const