MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetImportTimestamp

Function GetImportTimestamp

src/wallet/rpc/backup.cpp:1282–1294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1280}
1281
1282static int64_t GetImportTimestamp(const UniValue& data, int64_t now)
1283{
1284 if (data.exists("timestamp")) {
1285 const UniValue& timestamp = data["timestamp"];
1286 if (timestamp.isNum()) {
1287 return timestamp.get_int64();
1288 } else if (timestamp.isStr() && timestamp.get_str() == "now") {
1289 return now;
1290 }
1291 throw JSONRPCError(RPC_TYPE_ERROR, strprintf("Expected number or \"now\" timestamp value for key. got type %s", uvTypeName(timestamp.type())));
1292 }
1293 throw JSONRPCError(RPC_TYPE_ERROR, "Missing required timestamp field for key");
1294}
1295
1296RPCHelpMan importmulti()
1297{

Callers 2

importmultiFunction · 0.85
importdescriptorsFunction · 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