reactivate staked auth, and try to fetch era from auto function
This commit is contained in:
@@ -7,7 +7,7 @@ int GetSymbolAuthority(const char* symbol)
|
|||||||
{
|
{
|
||||||
if (strncmp(symbol, "TXSCL", 5) == 0)
|
if (strncmp(symbol, "TXSCL", 5) == 0)
|
||||||
return CROSSCHAIN_TXSCL;
|
return CROSSCHAIN_TXSCL;
|
||||||
if (is_STAKED("TEST") != 0) {
|
if (is_STAKED(symbol) != 0) {
|
||||||
printf("RETURNED CROSSCHAIN STAKED AS TRUE\n");
|
printf("RETURNED CROSSCHAIN STAKED AS TRUE\n");
|
||||||
return CROSSCHAIN_STAKED;
|
return CROSSCHAIN_STAKED;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight)
|
|||||||
NotarisationsInBlock vNotarisations;
|
NotarisationsInBlock vNotarisations;
|
||||||
//CrosschainAuthority auth_STAKED;
|
//CrosschainAuthority auth_STAKED;
|
||||||
int timestamp = block.nTime;
|
int timestamp = block.nTime;
|
||||||
printf("timestamp = %d",timestamp);
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < block.vtx.size(); i++) {
|
for (unsigned int i = 0; i < block.vtx.size(); i++) {
|
||||||
CTransaction tx = block.vtx[i];
|
CTransaction tx = block.vtx[i];
|
||||||
@@ -44,6 +43,9 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight)
|
|||||||
printf("Authorised notarisation data for %s \n",data.symbol);
|
printf("Authorised notarisation data for %s \n",data.symbol);
|
||||||
} else if (authority == CROSSCHAIN_STAKED) {
|
} else if (authority == CROSSCHAIN_STAKED) {
|
||||||
// We need to create auth_STAKED dynamically here based on timestamp
|
// We need to create auth_STAKED dynamically here based on timestamp
|
||||||
|
printf("timestamp = %d\n",timestamp);
|
||||||
|
int staked_era = STAKED_era(timestamp);
|
||||||
|
printf("ERA = %d \n", );
|
||||||
if (!CheckTxAuthority(tx, auth_STAKED))
|
if (!CheckTxAuthority(tx, auth_STAKED))
|
||||||
continue;
|
continue;
|
||||||
printf("Authorised notarisation data for %s \n",data.symbol);
|
printf("Authorised notarisation data for %s \n",data.symbol);
|
||||||
|
|||||||
Reference in New Issue
Block a user