Merge pull request #1061 from jl777/beta

0.3.1
This commit is contained in:
jl777
2018-12-10 12:20:21 -11:00
committed by GitHub
5 changed files with 22 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ if [ -z "$delay" ]; then delay=20; fi
./listassetchainparams | while read args; do ./listassetchainparams | while read args; do
gen="" gen=""
if [ $[RANDOM % 10] == 1 ]; then if [ $[RANDOM % 10] == 1 ]; then
gen=" -gen" gen=" -gen -genproclimit=1"
fi fi
./komodod $gen $args $overide_args -pubkey=$pubkey -addnode=$seed_ip & ./komodod $gen $args $overide_args -pubkey=$pubkey -addnode=$seed_ip &

View File

@@ -56,7 +56,7 @@ extern char ASSETCHAINS_SYMBOL[KOMODO_ASSETCHAIN_MAXLEN];
uint32_t komodo_segid32(char *coinaddr); uint32_t komodo_segid32(char *coinaddr);
int64_t komodo_coinsupply(int64_t *zfundsp,int32_t height); int64_t komodo_coinsupply(int64_t *zfundsp,int32_t height);
int32_t notarizedtxid_height(char *dest,char *txidstr,int32_t *kmdnotarized_heightp); int32_t notarizedtxid_height(char *dest,char *txidstr,int32_t *kmdnotarized_heightp);
#define KOMODO_VERSION "0.3.0" #define KOMODO_VERSION "0.3.1"
#define VERUS_VERSION "0.4.0g" #define VERUS_VERSION "0.4.0g"
extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT; extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT;
extern uint32_t ASSETCHAINS_CC; extern uint32_t ASSETCHAINS_CC;

View File

@@ -1167,12 +1167,12 @@ UniValue signrawtransaction(const UniValue& params, bool fHelp)
if ( txConst.IsCoinBase() != 0 ) if ( txConst.IsCoinBase() != 0 )
{ {
if ( (txpow & 2) == 0 ) if ( (txpow & 2) == 0 )
txpow == 0; txpow = 0;
} }
else else
{ {
if ( (txpow & 1) == 0 ) if ( (txpow & 1) == 0 )
txpow == 0; txpow = 0;
} }
} }
while ( 1 ) while ( 1 )

View File

@@ -1665,6 +1665,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
BOOST_FOREACH(const COutputEntry& r, listReceived) BOOST_FOREACH(const COutputEntry& r, listReceived)
{ {
string account; string account;
//fprintf(stderr,"recv iter %s\n",wtx.GetHash().GetHex().c_str());
if (pwalletMain->mapAddressBook.count(r.destination)) if (pwalletMain->mapAddressBook.count(r.destination))
account = pwalletMain->mapAddressBook[r.destination].name; account = pwalletMain->mapAddressBook[r.destination].name;
if (fAllAccounts || (account == strAccount)) if (fAllAccounts || (account == strAccount))
@@ -1815,7 +1816,10 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
{ {
CWalletTx *const pwtx = (*it).second.first; CWalletTx *const pwtx = (*it).second.first;
if (pwtx != 0) if (pwtx != 0)
{
//fprintf(stderr,"pwtx iter.%d %s\n",(int32_t)pwtx->nOrderPos,pwtx->GetHash().GetHex().c_str());
ListTransactions(*pwtx, strAccount, 0, true, ret, filter); ListTransactions(*pwtx, strAccount, 0, true, ret, filter);
} //else fprintf(stderr,"null pwtx\n");
CAccountingEntry *const pacentry = (*it).second.second; CAccountingEntry *const pacentry = (*it).second.second;
if (pacentry != 0) if (pacentry != 0)
AcentryToJSON(*pacentry, strAccount, ret); AcentryToJSON(*pacentry, strAccount, ret);

View File

@@ -1304,6 +1304,7 @@ CWallet::TxItems CWallet::OrderedTxItems(std::list<CAccountingEntry>& acentries,
{ {
CWalletTx* wtx = &((*it).second); CWalletTx* wtx = &((*it).second);
txOrdered.insert(make_pair(wtx->nOrderPos, TxPair(wtx, (CAccountingEntry*)0))); txOrdered.insert(make_pair(wtx->nOrderPos, TxPair(wtx, (CAccountingEntry*)0)));
//fprintf(stderr,"ordered iter.%d %s\n",(int32_t)wtx->nOrderPos,wtx->GetHash().GetHex().c_str());
} }
acentries.clear(); acentries.clear();
walletdb.ListAccountCreditDebit(strAccount, acentries); walletdb.ListAccountCreditDebit(strAccount, acentries);
@@ -2521,6 +2522,7 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
} }
// Sent/received. // Sent/received.
int32_t oneshot = 0;
for (unsigned int i = 0; i < vout.size(); ++i) for (unsigned int i = 0; i < vout.size(); ++i)
{ {
const CTxOut& txout = vout[i]; const CTxOut& txout = vout[i];
@@ -2532,11 +2534,19 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
{ {
// Don't report 'change' txouts // Don't report 'change' txouts
if (!(filter & ISMINE_CHANGE) && pwallet->IsChange(txout)) if (!(filter & ISMINE_CHANGE) && pwallet->IsChange(txout))
continue; {
if ( oneshot++ > 1 )
{
//fprintf(stderr,"skip change vout\n");
continue;
}
}
} }
else if (!(fIsMine & filter)) else if (!(fIsMine & filter))
{
//fprintf(stderr,"skip filtered vout %d %d\n",(int32_t)fIsMine,(int32_t)filter);
continue; continue;
}
// In either case, we need to get the destination address // In either case, we need to get the destination address
CTxDestination address; CTxDestination address;
if (!ExtractDestination(txout.scriptPubKey, address)) if (!ExtractDestination(txout.scriptPubKey, address))
@@ -2550,10 +2560,12 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
// If we are debited by the transaction, add the output as a "sent" entry // If we are debited by the transaction, add the output as a "sent" entry
if (nDebit > 0) if (nDebit > 0)
listSent.push_back(output); listSent.push_back(output);
//else fprintf(stderr,"not sent vout %d %d\n",(int32_t)fIsMine,(int32_t)filter);
// If we are receiving the output, add it as a "received" entry // If we are receiving the output, add it as a "received" entry
if (fIsMine & filter) if (fIsMine & filter)
listReceived.push_back(output); listReceived.push_back(output);
//else fprintf(stderr,"not received vout %d %d\n",(int32_t)fIsMine,(int32_t)filter);
} }
} }