diff --git a/src/assetchains b/src/assetchains index 57e705d5c6c..ce6c3aac2be 100755 --- a/src/assetchains +++ b/src/assetchains @@ -11,7 +11,7 @@ if [ -z "$delay" ]; then delay=20; fi ./listassetchainparams | while read args; do gen="" if [ $[RANDOM % 10] == 1 ]; then - gen=" -gen" + gen=" -gen -genproclimit=1" fi ./komodod $gen $args $overide_args -pubkey=$pubkey -addnode=$seed_ip & diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 03649b8b170..26c27323634 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -56,7 +56,7 @@ extern char ASSETCHAINS_SYMBOL[KOMODO_ASSETCHAIN_MAXLEN]; uint32_t komodo_segid32(char *coinaddr); int64_t komodo_coinsupply(int64_t *zfundsp,int32_t height); 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" extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT; extern uint32_t ASSETCHAINS_CC; diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index e6d356f90a6..21a6e26cd88 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1167,12 +1167,12 @@ UniValue signrawtransaction(const UniValue& params, bool fHelp) if ( txConst.IsCoinBase() != 0 ) { if ( (txpow & 2) == 0 ) - txpow == 0; + txpow = 0; } else { if ( (txpow & 1) == 0 ) - txpow == 0; + txpow = 0; } } while ( 1 ) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 1f4c2c59b4c..c34466a3904 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1665,6 +1665,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe BOOST_FOREACH(const COutputEntry& r, listReceived) { string account; + //fprintf(stderr,"recv iter %s\n",wtx.GetHash().GetHex().c_str()); if (pwalletMain->mapAddressBook.count(r.destination)) account = pwalletMain->mapAddressBook[r.destination].name; if (fAllAccounts || (account == strAccount)) @@ -1815,7 +1816,10 @@ UniValue listtransactions(const UniValue& params, bool fHelp) { CWalletTx *const pwtx = (*it).second.first; 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); + } //else fprintf(stderr,"null pwtx\n"); CAccountingEntry *const pacentry = (*it).second.second; if (pacentry != 0) AcentryToJSON(*pacentry, strAccount, ret); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index be4c8b5a6e8..3857f7090b8 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1304,6 +1304,7 @@ CWallet::TxItems CWallet::OrderedTxItems(std::list& acentries, { CWalletTx* wtx = &((*it).second); 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(); walletdb.ListAccountCreditDebit(strAccount, acentries); @@ -2521,6 +2522,7 @@ void CWalletTx::GetAmounts(list& listReceived, } // Sent/received. + int32_t oneshot = 0; for (unsigned int i = 0; i < vout.size(); ++i) { const CTxOut& txout = vout[i]; @@ -2532,11 +2534,19 @@ void CWalletTx::GetAmounts(list& listReceived, { // Don't report 'change' txouts if (!(filter & ISMINE_CHANGE) && pwallet->IsChange(txout)) - continue; + { + if ( oneshot++ > 1 ) + { + //fprintf(stderr,"skip change vout\n"); + continue; + } + } } else if (!(fIsMine & filter)) + { + //fprintf(stderr,"skip filtered vout %d %d\n",(int32_t)fIsMine,(int32_t)filter); continue; - + } // In either case, we need to get the destination address CTxDestination address; if (!ExtractDestination(txout.scriptPubKey, address)) @@ -2550,10 +2560,12 @@ void CWalletTx::GetAmounts(list& listReceived, // If we are debited by the transaction, add the output as a "sent" entry if (nDebit > 0) 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 (fIsMine & filter) listReceived.push_back(output); + //else fprintf(stderr,"not received vout %d %d\n",(int32_t)fIsMine,(int32_t)filter); } }