diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 0f009aab7..c59234ac1 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -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"); } }