After getting the getblocktemplate, hashing it, finding a solution and generating the proper message to submit to the blockchain, if i ever solve a block how does the network knows it was me and properly give the reward to my wallet?
i heard somewhere that i need to append a transaction sending 12.5 BTC to myself before generating the message, if that is true what does prevent anyone of generating more than one transaction and append before solving a block?
Does getblocktemplate coming from my bitcoin-cli already generates this transaction for me?