Bitcoin Forum

Bitcoin => Wallet software => Topic started by: zetal on April 28, 2017, 06:16:35 AM



Title: What is acting as a coinbase parameter in the breadwallet source(ios version)
Post by: zetal on April 28, 2017, 06:16:35 AM
https://github.com/voisine/breadwallet
I'm using breadwallet open source (above link) and i'll make different virtual currency wallet for ios app

But I can't see coinbase parameter (The Times 03/Jan/2009 Chancellor on brink of second bailout for banks)
I'm must changed this

Tell me what is acting as a coinbase parameter in the breadwallet source(ios version)

please help me


Title: Re: What is acting as a coinbase parameter in the breadwallet source(ios version)
Post by: achow101 on April 28, 2017, 01:20:34 PM
Breadwallet is a lite weight wallet. It does not download all blocks and transactions so it does not need to know the coinbase transaction of the genesis block and thus does not need its coinbase string. All it needs to know is the hash of the genesis block, and that is hard coded into the source code.


Title: Re: What is acting as a coinbase parameter in the breadwallet source(ios version)
Post by: HCP on April 29, 2017, 03:34:57 AM
To be precise, it is the first "hash" in the checkpoint_array[] struct defined for "main net" around line 79 in the source here:

https://github.com/voisine/breadwallet/blob/e607583477870bee2c0b4490b955c3aeb49ec7d8/BreadWallet/BRPeerManager.m

The hash is: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
Block Height is 0.

If you're creating a wallet for a different virtual currency, you would need to adjust all of the values in this struct to match the appropriate values in the blockchain for that currency.