Skip to content

Commit

Permalink
RPC: importmulti: Avoid using boost::variant::operator!=, which is on…
Browse files Browse the repository at this point in the history
…ly in newer boost versions
  • Loading branch information
luke-jr committed Oct 20, 2016
1 parent f2d7056 commit 7942d31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wallet/rpcdump.cpp
Expand Up @@ -808,7 +808,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");
}

Expand All @@ -819,7 +819,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");
}
}
Expand Down Expand Up @@ -881,7 +881,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");
}

Expand All @@ -892,7 +892,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");
}
}
Expand Down

0 comments on commit 7942d31

Please sign in to comment.