Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/avalanche.cpp
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | for (size_t i = 0; i < stakes.size(); i++) { | ||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid private key"); | throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid private key"); | ||||
} | } | ||||
} | } | ||||
const avalanche::Proof proof = pb.build(); | const avalanche::Proof proof = pb.build(); | ||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); | CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); | ||||
ss << proof; | ss << proof; | ||||
return HexStr(ss.begin(), ss.end()); | return HexStr(ss); | ||||
} | } | ||||
void RegisterAvalancheRPCCommands(CRPCTable &t) { | void RegisterAvalancheRPCCommands(CRPCTable &t) { | ||||
// clang-format off | // clang-format off | ||||
static const CRPCCommand commands[] = { | static const CRPCCommand commands[] = { | ||||
// category name actor (function) argNames | // category name actor (function) argNames | ||||
// ------------------- ------------------------ ---------------------- ---------- | // ------------------- ------------------------ ---------------------- ---------- | ||||
{ "avalanche", "getavalanchekey", getavalanchekey, {}}, | { "avalanche", "getavalanchekey", getavalanchekey, {}}, | ||||
Show All 9 Lines |