add is_staked function

This commit is contained in:
blackjok3r
2018-09-21 17:15:21 +08:00
parent c85b1ace10
commit 90f50a9ee7
5 changed files with 9 additions and 32 deletions

View File

@@ -3,14 +3,11 @@
#include "notarisationdb.h"
#include "notaries_staked.h"
//extern const char *notaries_STAKED[][2];
//extern const int num_notaries_STAKED;
int GetSymbolAuthority(const char* symbol)
{
if (strncmp(symbol, "TXSCL", 5) == 0)
return CROSSCHAIN_TXSCL;
if ( (strncmp(symbol, "STKD", 4) == 0) || (strncmp(symbol, "STAKED", 6) == 0) )
if (is_STAKED() == 1)
return CROSSCHAIN_STAKED;
return CROSSCHAIN_KOMODO;
}
@@ -56,7 +53,7 @@ bool CheckTxAuthority(const CTransaction &tx, CrosschainAuthority auth)
const CrosschainAuthority auth_STAKED = [&](){
CrosschainAuthority auth;
auth.requiredSigs = 4;
auth.requiredSigs = STAKED_MIN_SIGS;
auth.size = num_notaries_STAKED;
for (int n=0; n<auth.size; n++)
for (size_t i=0; i<33; i++)