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)
This commit is contained in:
parent
efded3ca9c
commit
6cacb79c03
@ -1012,7 +1012,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");
|
||||
}
|
||||
|
||||
@ -1023,7 +1023,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");
|
||||
}
|
||||
}
|
||||
@ -1085,7 +1085,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");
|
||||
}
|
||||
|
||||
@ -1096,7 +1096,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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user