From 7aea99c1a4abe7ef5893be07f37cc319d9be810c Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 24 Sep 2018 21:24:48 +0800 Subject: [PATCH] try and get timesstamp for crosschain auth height activation --- src/crosschain_authority.cpp | 1 - src/notarisationdb.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/crosschain_authority.cpp b/src/crosschain_authority.cpp index 5c0897512..78958b362 100644 --- a/src/crosschain_authority.cpp +++ b/src/crosschain_authority.cpp @@ -53,7 +53,6 @@ bool CheckTxAuthority(const CTransaction &tx, CrosschainAuthority auth) return true; } - const CrosschainAuthority auth_STAKED = [&](){ CrosschainAuthority auth; auth.requiredSigs = (num_notaries_STAKED / 5); diff --git a/src/notarisationdb.cpp b/src/notarisationdb.cpp index 916a5a185..ee6b4d267 100644 --- a/src/notarisationdb.cpp +++ b/src/notarisationdb.cpp @@ -4,6 +4,7 @@ #include "cc/eval.h" #include "crosschain.h" #include "main.h" +#include "notaries_staked.h" #include @@ -18,6 +19,9 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight) { EvalRef eval; NotarisationsInBlock vNotarisations; + //CrosschainAuthority auth_STAKED; + int timestamp = komodo_heightstamp(nHeight); + printf("timestamp = %d",timestamp) for (unsigned int i = 0; i < block.vtx.size(); i++) { CTransaction tx = block.vtx[i]; @@ -40,6 +44,8 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight) continue; } else if (authority == CROSSCHAIN_STAKED) { printf("Authorised notarisation data for %s \n",data.symbol); + // We need to create auth_STAKED dynamically here based on timestamp + if (!CheckTxAuthority(tx, auth_STAKED)) continue; }