From 09f9720ebb7d6997e53110e822ba55c66d5ee2e6 Mon Sep 17 00:00:00 2001 From: seelabs Date: Wed, 29 Mar 2017 15:22:15 -0400 Subject: [PATCH] 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 --- src/ripple/protocol/impl/Indexes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ripple/protocol/impl/Indexes.cpp b/src/ripple/protocol/impl/Indexes.cpp index c328395c1..2c4251e19 100644 --- a/src/ripple/protocol/impl/Indexes.cpp +++ b/src/ripple/protocol/impl/Indexes.cpp @@ -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(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);