Use the correct empty memo for Sapling outputs
This commit is contained in:
@@ -128,7 +128,7 @@ boost::optional<CTransaction> TransactionBuilder::Build()
|
|||||||
// Send change to the specified change address. If no change address
|
// Send change to the specified change address. If no change address
|
||||||
// was set, send change to the first Sapling address given as input.
|
// was set, send change to the first Sapling address given as input.
|
||||||
if (zChangeAddr) {
|
if (zChangeAddr) {
|
||||||
AddSaplingOutput(zChangeAddr->first, zChangeAddr->second, change, {});
|
AddSaplingOutput(zChangeAddr->first, zChangeAddr->second, change);
|
||||||
} else if (tChangeAddr) {
|
} else if (tChangeAddr) {
|
||||||
// tChangeAddr has already been validated.
|
// tChangeAddr has already been validated.
|
||||||
assert(AddTransparentOutput(tChangeAddr.value(), change));
|
assert(AddTransparentOutput(tChangeAddr.value(), change));
|
||||||
@@ -136,7 +136,7 @@ boost::optional<CTransaction> TransactionBuilder::Build()
|
|||||||
auto fvk = spends[0].expsk.full_viewing_key();
|
auto fvk = spends[0].expsk.full_viewing_key();
|
||||||
auto note = spends[0].note;
|
auto note = spends[0].note;
|
||||||
libzcash::SaplingPaymentAddress changeAddr(note.d, note.pk_d);
|
libzcash::SaplingPaymentAddress changeAddr(note.d, note.pk_d);
|
||||||
AddSaplingOutput(fvk.ovk, changeAddr, change, {});
|
AddSaplingOutput(fvk.ovk, changeAddr, change);
|
||||||
} else {
|
} else {
|
||||||
return boost::none;
|
return boost::none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public:
|
|||||||
uint256 ovk,
|
uint256 ovk,
|
||||||
libzcash::SaplingPaymentAddress to,
|
libzcash::SaplingPaymentAddress to,
|
||||||
CAmount value,
|
CAmount value,
|
||||||
std::array<unsigned char, ZC_MEMO_SIZE> memo);
|
std::array<unsigned char, ZC_MEMO_SIZE> memo = {{0xF6}});
|
||||||
|
|
||||||
// Assumes that the value correctly corresponds to the provided UTXO.
|
// Assumes that the value correctly corresponds to the provided UTXO.
|
||||||
void AddTransparentInput(COutPoint utxo, CScript scriptPubKey, CAmount value);
|
void AddTransparentInput(COutPoint utxo, CScript scriptPubKey, CAmount value);
|
||||||
|
|||||||
Reference in New Issue
Block a user