Skip to content

Commit 0e22855

Browse files
committed
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)
2 parents f2d7056 + 7942d31 commit 0e22855

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wallet/rpcdump.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ UniValue processImport(const UniValue& data) {
808808
CBitcoinAddress pubKeyAddress = CBitcoinAddress(pubKey.GetID());
809809

810810
// Consistency check.
811-
if (!isScript && pubKeyAddress.Get() != address.Get()) {
811+
if (!isScript && !(pubKeyAddress.Get() == address.Get())) {
812812
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Consistency check failed");
813813
}
814814

@@ -819,7 +819,7 @@ UniValue processImport(const UniValue& data) {
819819

820820
if (ExtractDestination(script, destination)) {
821821
scriptAddress = CBitcoinAddress(destination);
822-
if (scriptAddress.Get() != pubKeyAddress.Get()) {
822+
if (!(scriptAddress.Get() == pubKeyAddress.Get())) {
823823
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Consistency check failed");
824824
}
825825
}
@@ -881,7 +881,7 @@ UniValue processImport(const UniValue& data) {
881881
CBitcoinAddress pubKeyAddress = CBitcoinAddress(pubKey.GetID());
882882

883883
// Consistency check.
884-
if (!isScript && pubKeyAddress.Get() != address.Get()) {
884+
if (!isScript && !(pubKeyAddress.Get() == address.Get())) {
885885
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Consistency check failed");
886886
}
887887

@@ -892,7 +892,7 @@ UniValue processImport(const UniValue& data) {
892892

893893
if (ExtractDestination(script, destination)) {
894894
scriptAddress = CBitcoinAddress(destination);
895-
if (scriptAddress.Get() != pubKeyAddress.Get()) {
895+
if (!(scriptAddress.Get() == pubKeyAddress.Get())) {
896896
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Consistency check failed");
897897
}
898898
}

0 commit comments

Comments
 (0)