Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
laanwj committed Oct 20, 2016
2 parents f2d7056 + 7942d31 commit 0e22855
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 0e22855

Please sign in to comment.