revert era to 1
This commit is contained in:
@@ -23,7 +23,7 @@ static const char *iguanaSeeds[8][1] =
|
|||||||
static const int STAKED_ERA_GAP = 777;
|
static const int STAKED_ERA_GAP = 777;
|
||||||
|
|
||||||
static const int NUM_STAKED_ERAS = 4;
|
static const int NUM_STAKED_ERAS = 4;
|
||||||
static const int STAKED_NOTARIES_TIMESTAMP[NUM_STAKED_ERAS] = {1542885514, 1604222222, 1604233333, 1604244444};
|
static const int STAKED_NOTARIES_TIMESTAMP[NUM_STAKED_ERAS] = {1604111111, 1604222222, 1604233333, 1604244444};
|
||||||
|
|
||||||
// Era array of pubkeys.
|
// Era array of pubkeys.
|
||||||
static const char *notaries_STAKED[NUM_STAKED_ERAS][64][2] =
|
static const char *notaries_STAKED[NUM_STAKED_ERAS][64][2] =
|
||||||
|
|||||||
@@ -109,7 +109,28 @@ UniValue getiguanajson(const UniValue& params, bool fHelp)
|
|||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UniValue getnotarysendmany(const UniValue& params, bool fHelp)
|
||||||
|
{
|
||||||
|
if (fHelp || params.size() != 1)
|
||||||
|
throw runtime_error("getnotarysendmany\n<era> <amount to send>");
|
||||||
|
// era
|
||||||
|
int32_t era = params[0].get_int() - 1;
|
||||||
|
if ( era < 0 || era > NUM_STAKED_ERAS )
|
||||||
|
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid era");
|
||||||
|
// Amount
|
||||||
|
CAmount nAmount = AmountFromValue(params[1]);
|
||||||
|
if (nAmount <= 0)
|
||||||
|
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount for send");
|
||||||
|
UniValue ret(UniValue::VOBJ)
|
||||||
|
for (int i = 0; i<num_notaries_STAKED[era]; i++)
|
||||||
|
{
|
||||||
|
char *ADDRESS; uint8_t pubkey[33];
|
||||||
|
decode_hex(pubkey,33,(char *)notaries_STAKED[era][i][1]);
|
||||||
|
pubkey2addr((char *)ADDRESS,(uint8_t *)pubkey);
|
||||||
|
ret.push_back(Pair(ADDRESS,ValueFromAmount(nAmount)));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
UniValue getinfo(const UniValue& params, bool fHelp)
|
UniValue getinfo(const UniValue& params, bool fHelp)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user