maxinputs+1
This commit is contained in:
@@ -349,7 +349,7 @@ int64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,int64_t total,int3
|
|||||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
pwalletMain->AvailableCoins(vecOutputs, false, NULL, true);
|
pwalletMain->AvailableCoins(vecOutputs, false, NULL, true);
|
||||||
utxos = (struct CC_utxo *)calloc(maxutxos,sizeof(*utxos));
|
utxos = (struct CC_utxo *)calloc(maxutxos,sizeof(*utxos));
|
||||||
threshold = total/maxinputs;
|
threshold = total/(maxinputs+1);
|
||||||
if ( maxinputs > maxutxos )
|
if ( maxinputs > maxutxos )
|
||||||
maxutxos = maxinputs;
|
maxutxos = maxinputs;
|
||||||
sum = 0;
|
sum = 0;
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ int64_t AddFaucetInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPub
|
|||||||
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
||||||
GetCCaddress(cp,coinaddr,pk);
|
GetCCaddress(cp,coinaddr,pk);
|
||||||
SetCCunspents(unspentOutputs,coinaddr);
|
SetCCunspents(unspentOutputs,coinaddr);
|
||||||
threshold = total/maxinputs;
|
threshold = total/(maxinputs+1);
|
||||||
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
||||||
{
|
{
|
||||||
txid = it->first.txhash;
|
txid = it->first.txhash;
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ int64_t AddGatewaysInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CP
|
|||||||
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
||||||
GetCCaddress(cp,coinaddr,pk);
|
GetCCaddress(cp,coinaddr,pk);
|
||||||
SetCCunspents(unspentOutputs,coinaddr);
|
SetCCunspents(unspentOutputs,coinaddr);
|
||||||
threshold = total/maxinputs;
|
threshold = total/(maxinputs+1);
|
||||||
fprintf(stderr,"check %s for gateway inputs\n",coinaddr);
|
fprintf(stderr,"check %s for gateway inputs\n",coinaddr);
|
||||||
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ int64_t AddRewardsInputs(CScript &scriptPubKey,uint64_t maxseconds,struct CCcont
|
|||||||
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
||||||
GetCCaddress(cp,coinaddr,pk);
|
GetCCaddress(cp,coinaddr,pk);
|
||||||
SetCCunspents(unspentOutputs,coinaddr);
|
SetCCunspents(unspentOutputs,coinaddr);
|
||||||
threshold = total/maxinputs;
|
threshold = total/(maxinputs+1);
|
||||||
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
||||||
{
|
{
|
||||||
txid = it->first.txhash;
|
txid = it->first.txhash;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ static const unsigned int MAX_BLOCK_SIZE = 2000000;
|
|||||||
extern unsigned int MAX_BLOCK_SIGOPS;
|
extern unsigned int MAX_BLOCK_SIGOPS;
|
||||||
/** The maximum size of a transaction (network rule) */
|
/** The maximum size of a transaction (network rule) */
|
||||||
static const unsigned int MAX_TX_SIZE_BEFORE_SAPLING = 100000;
|
static const unsigned int MAX_TX_SIZE_BEFORE_SAPLING = 100000;
|
||||||
static const unsigned int MAX_TX_SIZE_AFTER_SAPLING = MAX_BLOCK_SIZE;
|
static const unsigned int MAX_TX_SIZE_AFTER_SAPLING = (2 * MAX_TX_SIZE_BEFORE_SAPLING); //MAX_BLOCK_SIZE;
|
||||||
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
|
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
|
||||||
extern int COINBASE_MATURITY;
|
extern int COINBASE_MATURITY;
|
||||||
/** The minimum value which is invalid for expiry height, used by CTransaction and CMutableTransaction */
|
/** The minimum value which is invalid for expiry height, used by CTransaction and CMutableTransaction */
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
// * Shut down WEEKS_UNTIL_DEPRECATION weeks' worth of blocks after the estimated release block height.
|
// * Shut down WEEKS_UNTIL_DEPRECATION weeks' worth of blocks after the estimated release block height.
|
||||||
// * A warning is shown during the DEPRECATION_WARN_LIMIT worth of blocks prior to shut down.
|
// * A warning is shown during the DEPRECATION_WARN_LIMIT worth of blocks prior to shut down.
|
||||||
static const int WEEKS_UNTIL_DEPRECATION = 52;
|
static const int WEEKS_UNTIL_DEPRECATION = 52;
|
||||||
static const int DEPRECATION_HEIGHT = 1400000;
|
static const int DEPRECATION_HEIGHT = 1600000;
|
||||||
static const int APPROX_RELEASE_HEIGHT = DEPRECATION_HEIGHT - (WEEKS_UNTIL_DEPRECATION * 7 * 24 * 60);
|
static const int APPROX_RELEASE_HEIGHT = DEPRECATION_HEIGHT - (WEEKS_UNTIL_DEPRECATION * 7 * 24 * 60);
|
||||||
|
|
||||||
// Number of blocks before deprecation to warn users
|
// Number of blocks before deprecation to warn users
|
||||||
|
|||||||
Reference in New Issue
Block a user