From cf8419309d907dc08043bb9ceb5dfcef610f9823 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Thu, 12 Jul 2018 12:48:41 -0600 Subject: [PATCH] Fix deterministic wallet keys in boost 1.67 or above (#967) * Fix deterministic wallet keys in boost 1.67 or above * Match existing casting idiom --- rai/node/wallet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rai/node/wallet.cpp b/rai/node/wallet.cpp index 62c81b46..9dbd5b6c 100644 --- a/rai/node/wallet.cpp +++ b/rai/node/wallet.cpp @@ -87,7 +87,7 @@ void rai::wallet_store::deterministic_key (rai::raw_key & prv_a, MDB_txn * trans uint32_t rai::wallet_store::deterministic_index_get (MDB_txn * transaction_a) { rai::wallet_value value (entry_get_raw (transaction_a, rai::wallet_store::deterministic_index_special)); - return value.key.number ().convert_to (); + return static_cast (value.key.number () & static_cast (-1)); } void rai::wallet_store::deterministic_index_set (MDB_txn * transaction_a, uint32_t index_a) @@ -492,7 +492,7 @@ bool rai::wallet_store::fetch (MDB_txn * transaction_a, rai::public_key const & { rai::raw_key seed_l; seed (seed_l, transaction_a); - uint32_t index (value.key.number ().convert_to ()); + uint32_t index (static_cast (value.key.number () & static_cast (-1))); deterministic_key (prv, transaction_a, index); break; }