From 7d8a97e1f98ae9d72f56ba62a123409248c4f9e9 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 24 Sep 2018 21:51:13 +0800 Subject: [PATCH] reactivate staked auth, and try to fetch era from auto function --- src/crosschain_authority.cpp | 2 +- src/notarisationdb.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/crosschain_authority.cpp b/src/crosschain_authority.cpp index 78958b362..8dc8fc77f 100644 --- a/src/crosschain_authority.cpp +++ b/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; } diff --git a/src/notarisationdb.cpp b/src/notarisationdb.cpp index a2052c8bf..f4ba4dfe7 100644 --- a/src/notarisationdb.cpp +++ b/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);