mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-24 12:35:50 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user