From 6c7930f688d7942fdebadff38cc29751116f0f2c Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 22 Dec 2017 21:07:27 +0000 Subject: [PATCH] Use uint64_t instead of size_t for serialized indices into tx.vjoinsplit size_t has no guarantee of uniform size, and thus far has been serialized as a uint64_t on supported platforms. --- src/paymentdisclosure.h | 2 +- src/wallet/wallet.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/paymentdisclosure.h b/src/paymentdisclosure.h index e6a995ab4..c5d29d5c6 100644 --- a/src/paymentdisclosure.h +++ b/src/paymentdisclosure.h @@ -73,7 +73,7 @@ struct PaymentDisclosurePayload { uint8_t version; // 0 = experimental, 1 = first production version, etc. uint256 esk; // zcash/NoteEncryption.cpp uint256 txid; // primitives/transaction.h - size_t js; // Index into CTransaction.vjoinsplit + uint64_t js; // Index into CTransaction.vjoinsplit uint8_t n; // Index into JSDescription fields of length ZC_NUM_JS_OUTPUTS libzcash::PaymentAddress zaddr; // zcash/Address.hpp std::string message; // parameter to RPC call diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 82fb1dca0..cfa0cbf8b 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -159,7 +159,7 @@ public: // Transaction hash uint256 hash; // Index into CTransaction.vjoinsplit - size_t js; + uint64_t js; // Index into JSDescription fields of length ZC_NUM_JS_OUTPUTS uint8_t n;