Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: number435398 on October 07, 2018, 08:04:00 PM



Title: Altcoin branch of Litecoin 16.3 won't show transactions
Post by: number435398 on October 07, 2018, 08:04:00 PM
I forked the litecoin wallet version 16.3 for an altcoin.  When I mined directly to the wallet, I mined a number of blocks, but none showed up in the wallet transactions.  They did show up on the explorer.  I was also able to confirm the transactions within the console of the wallet, but didn't show up.  I then transferred some coins from another wallet to this one's address; still didn't show up in the wallet.  It has been over 12 hours and far beyond any "maturity" code for either the coinbase or regular transactions to appear.  I'm not aware of tweaking any code that could impact that.  What parts of the code could produce and or affect this result?  The transactions don't even appear as pending.  They simply don't display and attempting to send the coins results in the claim that there are no coins in my wallet.


Title: Re: Altcoin branch of Litecoin 16.3 won't show transactions
Post by: Heisenberg_Hunter on October 10, 2018, 06:53:25 AM
Try restarting the wallet via cmd. While restarting type --rescan in cmd so that the wallet would re-compute almost all the transactions and would display the new updated balances. I need few details so that I can figure out where have you gone wrong

[1] Are the coins showing up in another wallet? Since you have said you sent coins from another wallet, does that mean have you mined some coins to another wallet and are those coins showing up in that another wallet?

Litecoin official core wallet automatically rescans the portion of the blockchain and shows updated balances from time to time.

Quote
What parts of the code could produce and or affect this result?
I am not really good in the code, but let me try to explain how flow works...

Suppose you are the one who creates the Block and adds transaction to them using CreateNewBlock class. Once you have solved the block, the coinbase transaction looks for the scriptPubKey parameter of the class and sends you the generated coins.

For you to get paid by coinbase transaction, the code is present in miner.cpp file I guess. I am not really sure about it  :P

Code:
// Create coinbase transaction.
    CMutableTransaction coinbaseTx;
    coinbaseTx.vin.resize(1);
    coinbaseTx.vin[0].prevout.SetNull();
    coinbaseTx.vout.resize(1);
    coinbaseTx.vout[0].scriptPubKey = scriptPubKeyIn;
    coinbaseTx.vout[0].nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
    coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0;
    pblock->vtx[0] = MakeTransactionRef(std::move(coinbaseTx));
    pblocktemplate->vchCoinbaseCommitment = GenerateCoinbaseCommitment(*pblock, pindexPrev, chainparams.GetConsensus());
    pblocktemplate->vTxFees[0] = -nFees;

    LogPrintf("CreateNewBlock(): block weight: %u txs: %u fees: %ld sigops %d\n", GetBlockWeight(*pblock), nBlockTx, nFees, nBlockSigOpsCost);


Title: Re: Altcoin branch of Litecoin 16.3 won't show transactions
Post by: number435398 on October 10, 2018, 11:30:28 AM
This matter evolved into this:
https://bitcointalk.org/index.php?topic=5046457.msg46665973#msg46665973