mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-27 16:05:39 +01:00
scripted-diff: Replace NullUniValue with UniValue::VNULL
This is required for removing the UniValue copy constructor. -BEGIN VERIFY SCRIPT- sed -i 's/return NullUniValue/return UniValue::VNULL/g' $(git grep -l NullUniValue ':(exclude)src/univalue') -END VERIFY SCRIPT-
This commit is contained in:
@@ -397,7 +397,7 @@ static RPCHelpMan syncwithvalidationinterfacequeue()
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
SyncWithValidationInterfaceQueue();
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1056,11 +1056,11 @@ static RPCHelpMan gettxout()
|
||||
LOCK(mempool.cs);
|
||||
CCoinsViewMemPool view(coins_view, mempool);
|
||||
if (!view.GetCoin(out, coin) || mempool.isSpent(out)) {
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
}
|
||||
} else {
|
||||
if (!coins_view->GetCoin(out, coin)) {
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1498,7 +1498,7 @@ static RPCHelpMan preciousblock()
|
||||
throw JSONRPCError(RPC_DATABASE_ERROR, state.ToString());
|
||||
}
|
||||
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1539,7 +1539,7 @@ static RPCHelpMan invalidateblock()
|
||||
throw JSONRPCError(RPC_DATABASE_ERROR, state.ToString());
|
||||
}
|
||||
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1579,7 +1579,7 @@ static RPCHelpMan reconsiderblock()
|
||||
throw JSONRPCError(RPC_DATABASE_ERROR, state.ToString());
|
||||
}
|
||||
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -2098,7 +2098,7 @@ static RPCHelpMan scantxoutset()
|
||||
CoinsViewScanReserver reserver;
|
||||
if (reserver.reserve()) {
|
||||
// no scan in progress
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
}
|
||||
result.pushKV("progress", g_scan_progress.load());
|
||||
return result;
|
||||
|
||||
@@ -476,7 +476,7 @@ static RPCHelpMan prioritisetransaction()
|
||||
static UniValue BIP22ValidationResult(const BlockValidationState& state)
|
||||
{
|
||||
if (state.IsValid())
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
|
||||
if (state.IsError())
|
||||
throw JSONRPCError(RPC_VERIFY_ERROR, state.ToString());
|
||||
@@ -1040,7 +1040,7 @@ static RPCHelpMan submitheader()
|
||||
|
||||
BlockValidationState state;
|
||||
chainman.ProcessNewBlockHeaders({h}, state);
|
||||
if (state.IsValid()) return NullUniValue;
|
||||
if (state.IsValid()) return UniValue::VNULL;
|
||||
if (state.IsError()) {
|
||||
throw JSONRPCError(RPC_VERIFY_ERROR, state.ToString());
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ static RPCHelpMan ping()
|
||||
|
||||
// Request that each node send a ping during next message processing pass
|
||||
peerman.SendPings();
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -304,7 +304,7 @@ static RPCHelpMan addnode()
|
||||
{
|
||||
CAddress addr;
|
||||
connman.OpenNetworkConnection(addr, false, nullptr, strNode.c_str(), ConnectionType::MANUAL);
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
}
|
||||
|
||||
if (strCommand == "add")
|
||||
@@ -320,7 +320,7 @@ static RPCHelpMan addnode()
|
||||
}
|
||||
}
|
||||
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -423,7 +423,7 @@ static RPCHelpMan disconnectnode()
|
||||
throw JSONRPCError(RPC_CLIENT_NODE_NOT_CONNECTED, "Node not found in connected nodes");
|
||||
}
|
||||
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -745,7 +745,7 @@ static RPCHelpMan setban()
|
||||
throw JSONRPCError(RPC_CLIENT_INVALID_IP_OR_SUBNET, "Error: Unban failed. Requested address/subnet was not previously manually banned.");
|
||||
}
|
||||
}
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -819,7 +819,7 @@ static RPCHelpMan clearbanned()
|
||||
|
||||
node.banman->ClearBanned();
|
||||
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ static RPCHelpMan setmocktime()
|
||||
}
|
||||
}
|
||||
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -85,7 +85,7 @@ static RPCHelpMan invokedisallowedsyscall()
|
||||
throw std::runtime_error("invokedisallowedsyscall is used for testing only.");
|
||||
}
|
||||
TestDisallowedSandboxCall();
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -118,7 +118,7 @@ static RPCHelpMan mockscheduler()
|
||||
CHECK_NONFATAL(node_context->scheduler);
|
||||
node_context->scheduler->MockForward(std::chrono::seconds(delta_seconds));
|
||||
|
||||
return NullUniValue;
|
||||
return UniValue::VNULL;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user