Possible fix for sapling CC
This commit is contained in:
@@ -105,6 +105,7 @@ extern CWallet* pwalletMain;
|
|||||||
#endif
|
#endif
|
||||||
bool GetAddressUnspent(uint160 addressHash, int type,std::vector<std::pair<CAddressUnspentKey,CAddressUnspentValue> > &unspentOutputs);
|
bool GetAddressUnspent(uint160 addressHash, int type,std::vector<std::pair<CAddressUnspentKey,CAddressUnspentValue> > &unspentOutputs);
|
||||||
CBlockIndex *komodo_getblockindex(uint256 hash);
|
CBlockIndex *komodo_getblockindex(uint256 hash);
|
||||||
|
int32_t komodo_nextheight();
|
||||||
|
|
||||||
static const uint256 zeroid;
|
static const uint256 zeroid;
|
||||||
bool myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock);
|
bool myGetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock);
|
||||||
|
|||||||
@@ -214,7 +214,8 @@ std::string FaucetGet(uint64_t txfee)
|
|||||||
|
|
||||||
std::string FaucetFund(uint64_t txfee,int64_t funds)
|
std::string FaucetFund(uint64_t txfee,int64_t funds)
|
||||||
{
|
{
|
||||||
CMutableTransaction mtx; CPubKey mypk,faucetpk; CScript opret; struct CCcontract_info *cp,C;
|
CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), komodo_nextheight());
|
||||||
|
CPubKey mypk,faucetpk; CScript opret; struct CCcontract_info *cp,C;
|
||||||
cp = CCinit(&C,EVAL_FAUCET);
|
cp = CCinit(&C,EVAL_FAUCET);
|
||||||
if ( txfee == 0 )
|
if ( txfee == 0 )
|
||||||
txfee = 10000;
|
txfee = 10000;
|
||||||
|
|||||||
@@ -1062,6 +1062,14 @@ uint64_t komodo_accrued_interest(int32_t *txheightp,uint32_t *locktimep,uint256
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t komodo_nextheight()
|
||||||
|
{
|
||||||
|
int32_t longest = komodo_longestchain();
|
||||||
|
if ( (pindex= chainActive.LastTip()) != 0 && (ht= pindex->GetHeight()) >= longest )
|
||||||
|
return(ht+1);
|
||||||
|
else return(longest + 1);
|
||||||
|
}
|
||||||
|
|
||||||
int32_t komodo_isrealtime(int32_t *kmdheightp)
|
int32_t komodo_isrealtime(int32_t *kmdheightp)
|
||||||
{
|
{
|
||||||
struct komodo_state *sp; CBlockIndex *pindex;
|
struct komodo_state *sp; CBlockIndex *pindex;
|
||||||
|
|||||||
Reference in New Issue
Block a user