MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetImportTimestamp

Function GetImportTimestamp

src/wallet/rpcdump.cpp:1110–1122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1108}
1109
1110static int64_t GetImportTimestamp(const UniValue& data, int64_t now)
1111{
1112 if (data.exists("timestamp")) {
1113 const UniValue& timestamp = data["timestamp"];
1114 if (timestamp.isNum()) {
1115 return timestamp.get_int64();
1116 } else if (timestamp.isStr() && timestamp.get_str() == "now") {
1117 return now;
1118 }
1119 throw JSONRPCError(RPC_TYPE_ERROR, strprintf("Expected number or \"now\" timestamp value for key. got type %s", uvTypeName(timestamp.type())));
1120 }
1121 throw JSONRPCError(RPC_TYPE_ERROR, "Missing required timestamp field for key");
1122}
1123
1124UniValue importmulti(const JSONRPCRequest& mainRequest)
1125{

Callers 1

importmultiFunction · 0.85

Calls 7

JSONRPCErrorFunction · 0.85
uvTypeNameFunction · 0.85
isNumMethod · 0.80
get_int64Method · 0.80
isStrMethod · 0.80
typeMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected