@@ -808,7 +808,7 @@ UniValue processImport(const UniValue& data) {
808
808
CBitcoinAddress pubKeyAddress = CBitcoinAddress (pubKey.GetID ());
809
809
810
810
// Consistency check.
811
- if (!isScript && pubKeyAddress.Get () != address.Get ()) {
811
+ if (!isScript && !( pubKeyAddress.Get () == address.Get () )) {
812
812
throw JSONRPCError (RPC_INVALID_ADDRESS_OR_KEY, " Consistency check failed" );
813
813
}
814
814
@@ -819,7 +819,7 @@ UniValue processImport(const UniValue& data) {
819
819
820
820
if (ExtractDestination (script, destination)) {
821
821
scriptAddress = CBitcoinAddress (destination);
822
- if (scriptAddress.Get () != pubKeyAddress.Get ()) {
822
+ if (!( scriptAddress.Get () == pubKeyAddress.Get () )) {
823
823
throw JSONRPCError (RPC_INVALID_ADDRESS_OR_KEY, " Consistency check failed" );
824
824
}
825
825
}
@@ -881,7 +881,7 @@ UniValue processImport(const UniValue& data) {
881
881
CBitcoinAddress pubKeyAddress = CBitcoinAddress (pubKey.GetID ());
882
882
883
883
// Consistency check.
884
- if (!isScript && pubKeyAddress.Get () != address.Get ()) {
884
+ if (!isScript && !( pubKeyAddress.Get () == address.Get () )) {
885
885
throw JSONRPCError (RPC_INVALID_ADDRESS_OR_KEY, " Consistency check failed" );
886
886
}
887
887
@@ -892,7 +892,7 @@ UniValue processImport(const UniValue& data) {
892
892
893
893
if (ExtractDestination (script, destination)) {
894
894
scriptAddress = CBitcoinAddress (destination);
895
- if (scriptAddress.Get () != pubKeyAddress.Get ()) {
895
+ if (!( scriptAddress.Get () == pubKeyAddress.Get () )) {
896
896
throw JSONRPCError (RPC_INVALID_ADDRESS_OR_KEY, " Consistency check failed" );
897
897
}
898
898
}
0 commit comments