From 63e86d6ace4532ce2ba9520168dc678874dbd3f9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 19 Nov 2018 02:54:26 -1100 Subject: [PATCH 1/3] Fix for staked chains --- src/komodo_utils.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 253e1ab64..dd6cd64e6 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1637,7 +1637,11 @@ uint64_t komodo_ac_block_subsidy(int nHeight) } if ( nHeight == 1 ) if ( ASSETCHAINS_LASTERA == 0 ) - subsidy = ASSETCHAINS_SUPPLY * SATOSHIDEN + (ASSETCHAINS_MAGIC & 0xffffff); + { + if ( ASSETCHAINS_STAKED == 0 ) + subsidy = ASSETCHAINS_SUPPLY * SATOSHIDEN + (ASSETCHAINS_MAGIC & 0xffffff); + else subsidy = ASSETCHAINS_SUPPLY * SATOSHIDEN + ASSETCHAINS_MAGIC; + } else subsidy += ASSETCHAINS_SUPPLY * SATOSHIDEN + (ASSETCHAINS_MAGIC & 0xffffff); From bf638d3e669ef879d91912789a1ab6f0edb41ce8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 19 Nov 2018 06:58:07 -1100 Subject: [PATCH 2/3] Revert oracles != -> > for oraclesdatafee --- src/cc/oracles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc/oracles.cpp b/src/cc/oracles.cpp index 8cb784b63..dd5b763c1 100644 --- a/src/cc/oracles.cpp +++ b/src/cc/oracles.cpp @@ -545,7 +545,7 @@ bool OraclesDataValidate(struct CCcontract_info *cp,Eval* eval,const CTransactio CTransaction vinTx; uint256 hashBlock,activehash; int32_t i,numvins,numvouts; int64_t inputs=0,outputs=0,assetoshis; CScript scriptPubKey; numvins = tx.vin.size(); numvouts = tx.vout.size(); - if ( OracleDatafee(scriptPubKey,oracletxid,publisher) > datafee ) + if ( OracleDatafee(scriptPubKey,oracletxid,publisher) != datafee ) return eval->Invalid("mismatched datafee"); scriptPubKey = MakeCC1vout(cp->evalcode,0,publisher).scriptPubKey; for (i=0; i Date: Mon, 19 Nov 2018 08:52:44 -1100 Subject: [PATCH 3/3] Fix print --- src/cc/oracles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc/oracles.cpp b/src/cc/oracles.cpp index dd5b763c1..5bee9ce86 100644 --- a/src/cc/oracles.cpp +++ b/src/cc/oracles.cpp @@ -235,7 +235,7 @@ int64_t OracleDatafee(CScript &scriptPubKey,uint256 oracletxid,CPubKey publisher } else { - fprintf(stderr,"Could not decode op_ret from transaction %x\nscriptPubKey: %s\n", oracletxid, oracletx.vout[numvouts-1].scriptPubKey.ToString().c_str()); + fprintf(stderr,"Could not decode op_ret from transaction %s\nscriptPubKey: %s\n", oracletxid.GetHex().c_str(), oracletx.vout[numvouts-1].scriptPubKey.ToString().c_str()); } } return(datafee);