try and get timesstamp for crosschain auth height activation
This commit is contained in:
@@ -53,7 +53,6 @@ bool CheckTxAuthority(const CTransaction &tx, CrosschainAuthority auth)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const CrosschainAuthority auth_STAKED = [&](){
|
const CrosschainAuthority auth_STAKED = [&](){
|
||||||
CrosschainAuthority auth;
|
CrosschainAuthority auth;
|
||||||
auth.requiredSigs = (num_notaries_STAKED / 5);
|
auth.requiredSigs = (num_notaries_STAKED / 5);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "cc/eval.h"
|
#include "cc/eval.h"
|
||||||
#include "crosschain.h"
|
#include "crosschain.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include "notaries_staked.h"
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
|
|
||||||
@@ -18,6 +19,9 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight)
|
|||||||
{
|
{
|
||||||
EvalRef eval;
|
EvalRef eval;
|
||||||
NotarisationsInBlock vNotarisations;
|
NotarisationsInBlock vNotarisations;
|
||||||
|
//CrosschainAuthority auth_STAKED;
|
||||||
|
int timestamp = komodo_heightstamp(nHeight);
|
||||||
|
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];
|
||||||
@@ -40,6 +44,8 @@ NotarisationsInBlock ScanBlockNotarisations(const CBlock &block, int nHeight)
|
|||||||
continue;
|
continue;
|
||||||
} else if (authority == CROSSCHAIN_STAKED) {
|
} else if (authority == CROSSCHAIN_STAKED) {
|
||||||
printf("Authorised notarisation data for %s \n",data.symbol);
|
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))
|
if (!CheckTxAuthority(tx, auth_STAKED))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user