Hooks-chaining alpha

This is a squash of 241 commits from https://github.com/XRPL-Labs/xrpld-hooks/tree/hooks-chaining
Ready for forward porting to rippled 1.8.3
This commit is contained in:
Richard Holland
2020-07-21 17:09:06 +02:00
parent 04d642387f
commit b33c91f761
66 changed files with 8276 additions and 36 deletions

View File

@@ -161,7 +161,9 @@ decodeBase58(std::string const& s)
}
if (remain > 64)
{
return {};
}
// Allocate enough space in big-endian base256 representation.
// log(58) / log(256), rounded up.
@@ -170,7 +172,9 @@ decodeBase58(std::string const& s)
{
auto carry = alphabetReverse[*psz];
if (carry == -1)
{
return {};
}
// Apply "b256 = b256 * 58 + carry".
for (auto iter = b256.rbegin(); iter != b256.rend(); ++iter)
{
@@ -190,6 +194,7 @@ decodeBase58(std::string const& s)
result.assign(zeroes, 0x00);
while (iter != b256.end())
result.push_back(*(iter++));
return result;
}