Browse Source

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)
0.14
Wladimir J. van der Laan 8 years ago
parent
commit
0e228557f2
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 8
      src/wallet/rpcdump.cpp

8
src/wallet/rpcdump.cpp

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

Loading…
Cancel
Save