Resolve guix non-determinism with emplace_back instead of push_back
For some reason, building x86_64-w64-mingw32 on x86_64 and aarch64 results in a single instruction difference which can be traced down to prevector.h:174. The ultimate caller of this is the copy constructor for a prevector that ends up being called by std::vector::push_back in walletmodel.cpp:183. By replacing the push_back with an emplace_back, somehow this non-determinism goes away.
This commit is contained in:
1 parent
b7e9dc8e46
commit
f43571010e
1 file changed
+1
-2
@@ -179,8 +179,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
|||||||
setAddress.insert(rcp.address);
|
setAddress.insert(rcp.address);
|
||||||
++nAddresses;
|
++nAddresses;
|
||||||
|
|
||||||
CRecipient recipient{DecodeDestination(rcp.address.toStdString()), rcp.amount, rcp.fSubtractFeeFromAmount};
|
vecSend.emplace_back(CRecipient{DecodeDestination(rcp.address.toStdString()), rcp.amount, rcp.fSubtractFeeFromAmount});
|
||||||
vecSend.push_back(recipient);
|
|
||||||
|
|
||||||
total += rcp.amount;
|
total += rcp.amount;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user