From 3330881171f284e9edc2b578e681237f551aedd3 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Thu, 20 Sep 2018 22:44:41 +0800 Subject: [PATCH] Use min sigs = 3 for staked chains, so we can add more pubkeys. --- src/crosschain_authority.cpp | 2 +- src/komodo.h | 5 +++-- src/komodo_notary.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/crosschain_authority.cpp b/src/crosschain_authority.cpp index b6b6c22e7..30e4e725a 100644 --- a/src/crosschain_authority.cpp +++ b/src/crosschain_authority.cpp @@ -73,7 +73,7 @@ bool CheckTxAuthority(const CTransaction &tx, CrosschainAuthority auth) const CrosschainAuthority auth_STAKED = [&](){ CrosschainAuthority auth; auth.size = (int32_t)(sizeof(notaries_STAKEDcc)/sizeof(*notaries_STAKEDcc)); - auth.requiredSigs = (auth.size/5); + auth.requiredSigs = 3; for (int n=0; n= KOMODO_MINRATIFY) || (numvalid >= KOMODO_MINRATIFY && ASSETCHAINS_SYMBOL[0] != 0) || - numvalid > (numnotaries/5)) ) + numvalid > (numnotaries/5)) || + ( (strncmp(ASSETCHAINS_SYMBOL, "STKD", 4) == 0) || (strncmp(ASSETCHAINS_SYMBOL, "STAKED", 6) == 0) ) && numvalid > 3 ) { if ( ASSETCHAINS_SYMBOL[0] != 0 ) { diff --git a/src/komodo_notary.h b/src/komodo_notary.h index c2645b3f2..c2e7ed631 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -246,7 +246,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam { if ( did1 == 0 ) { - if ( (strlen(ASSETCHAINS_SYMBOL) >= 4 && strncmp(ASSETCHAINS_SYMBOL, "STKD", 4) == 0) || (strlen(ASSETCHAINS_SYMBOL) >= 6 && strncmp(ASSETCHAINS_SYMBOL, "STAKED", 6) == 0) ) + if ( (strncmp(ASSETCHAINS_SYMBOL, "STKD", 4) == 0) || (strncmp(ASSETCHAINS_SYMBOL, "STAKED", 6) == 0) ) { n1 = (int32_t)(sizeof(notaries_STAKED)/sizeof(*notaries_STAKED)); for (i=0; i