MCPcopy Create free account
hub / github.com/LUX-Core/lux / BIP22ValidationResult

Function BIP22ValidationResult

src/rpcmining.cpp:313–328  ·  view source on GitHub ↗

NOTE: Assumes a conclusive result; if result is inconclusive, it must be handled by caller

Source from the content-addressed store, hash-verified

311
312// NOTE: Assumes a conclusive result; if result is inconclusive, it must be handled by caller
313static UniValue BIP22ValidationResult(const CValidationState& state)
314{
315 if (state.IsValid())
316 return NullUniValue;
317
318 std::string strRejectReason = state.GetRejectReason();
319 if (state.IsError())
320 throw JSONRPCError(RPC_VERIFY_ERROR, strRejectReason);
321 if (state.IsInvalid()) {
322 if (strRejectReason.empty())
323 return "rejected";
324 return strRejectReason;
325 }
326 // Should be impossible
327 return "valid?";
328}
329
330std::string gbt_vb_name(const Consensus::DeploymentPos pos) {
331 const struct BIP9DeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];

Callers 2

getblocktemplateFunction · 0.85
submitblockFunction · 0.85

Calls 6

JSONRPCErrorFunction · 0.85
GetRejectReasonMethod · 0.80
IsErrorMethod · 0.80
IsInvalidMethod · 0.80
IsValidMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected