Merge #8980: RPC: importmulti: Avoid using boost::variant::operator!=, which is only in newer boost versions

7942d31 RPC: importmulti: Avoid using boost::variant::operator!=, which is only in newer boost versions (Luke Dashjr)
This commit is contained in:
Wladimir J. van der Laan 2016-10-20 20:21:11 +02:00 committed by Alexander Block
parent efded3ca9c
commit 6cacb79c03

View File

@ -1012,7 +1012,7 @@ UniValue processImport(const UniValue& data) {
CBitcoinAddress pubKeyAddress = CBitcoinAddress(pubKey.GetID());
// Consistency check.
if (!isScript && pubKeyAddress.Get() != address.Get()) {
if (!isScript && !(pubKeyAddress.Get() == address.Get())) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Consistency check failed");
}
@ -1023,7 +1023,7 @@ UniValue processImport(const UniValue& data) {
if (ExtractDestination(script, destination)) {
scriptAddress = CBitcoinAddress(destination);
if (scriptAddress.Get() != pubKeyAddress.Get()) {
if (!(scriptAddress.Get() == pubKeyAddress.Get())) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Consistency check failed");
}
}
@ -1085,7 +1085,7 @@ UniValue processImport(const UniValue& data) {
CBitcoinAddress pubKeyAddress = CBitcoinAddress(pubKey.GetID());
// Consistency check.
if (!isScript && pubKeyAddress.Get() != address.Get()) {
if (!isScript && !(pubKeyAddress.Get() == address.Get())) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Consistency check failed");
}
@ -1096,7 +1096,7 @@ UniValue processImport(const UniValue& data) {
if (ExtractDestination(script, destination)) {
scriptAddress = CBitcoinAddress(destination);
if (scriptAddress.Get() != pubKeyAddress.Get()) {
if (!(scriptAddress.Get() == pubKeyAddress.Get())) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Consistency check failed");
}
}