mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Correctly calculate Escrow and PayChan identifiers:
This change fixes a technical flaw that resulted from using 32-bit space identifiers instead of the protocol-defined 16-bit values. Details: https://ripple.com/build/ledger-format/#tree-format
This commit is contained in:
@@ -317,7 +317,7 @@ escrow (AccountID const& source, std::uint32_t seq)
|
||||
{
|
||||
sha512_half_hasher h;
|
||||
using beast::hash_append;
|
||||
hash_append(h, spaceEscrow);
|
||||
hash_append(h, std::uint16_t(spaceEscrow));
|
||||
hash_append(h, source);
|
||||
hash_append(h, seq);
|
||||
return { ltESCROW, static_cast<uint256>(h) };
|
||||
@@ -328,7 +328,7 @@ payChan (AccountID const& source, AccountID const& dst, std::uint32_t seq)
|
||||
{
|
||||
sha512_half_hasher h;
|
||||
using beast::hash_append;
|
||||
hash_append(h, spaceXRPUChannel);
|
||||
hash_append(h, std::uint16_t(spaceXRPUChannel));
|
||||
hash_append(h, source);
|
||||
hash_append(h, dst);
|
||||
hash_append(h, seq);
|
||||
|
||||
Reference in New Issue
Block a user