Browse Source

reactivate staked auth, and try to fetch era from auto function

pull/27/head
blackjok3r 6 years ago
parent
commit
7d8a97e1f9
  1. 2
      src/crosschain_authority.cpp
  2. 4
      src/notarisationdb.cpp

2
src/crosschain_authority.cpp

@ -7,7 +7,7 @@ int GetSymbolAuthority(const char* symbol)
{
if (strncmp(symbol, "TXSCL", 5) == 0)
return CROSSCHAIN_TXSCL;
if (is_STAKED("TEST") != 0) {
if (is_STAKED(symbol) != 0) {
printf("RETURNED CROSSCHAIN STAKED AS TRUE\n");
return CROSSCHAIN_STAKED;
}

4
src/notarisationdb.cpp

@ -21,7 +21,6 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight)
NotarisationsInBlock vNotarisations;
//CrosschainAuthority auth_STAKED;
int timestamp = block.nTime;
printf("timestamp = %d",timestamp);
for (unsigned int i = 0; i < block.vtx.size(); 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);
} else if (authority == CROSSCHAIN_STAKED) {
// 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))
continue;
printf("Authorised notarisation data for %s \n",data.symbol);

Loading…
Cancel
Save