General purpose programming language.

learn more… | top users | synonyms

1
vote
1answer
31 views

What is the function of LOCK(cs_main)?

Does LOCK(cs_main) pause and branach the program in order to do some necessary job before going on? I'm trying to publish blocks reactively (as a selfish miner) upon receipt of inventory message from ...
0
votes
1answer
25 views

How to access peer's tip of chain?

In case I'm a selfish miner and have successfully forked the blockchain, I'd like to know the state of progress of my honest nodes at any given time - how can I achieve this? Do peers on separate ...
2
votes
2answers
44 views

Two if's before sending an inventory message

Going through main.cpp I couldn't completely understand the purpose of a double barrier coded as if-statements: I'm referring to ... if (pto->setInventoryKnown.count(inv)) and if ...
1
vote
1answer
73 views

Block Broadcasting - Unsolicited Block Push

Can someone, please, direct me to the source code section(s) relevant for an Unsolicited Block Push as described in the Bitcoin Developer Guide? I've been going through main.cpp and searched for the ...
0
votes
1answer
77 views

Call function for block n on blockchain

I've been going through main.cpp in order to roughly find out which function calls the best block and I found out depending on situation there are several similar-sounding function names and code ...
-1
votes
1answer
49 views

“Array& params”: How to understand “&” after “Array” - type modifer?

I'm trying to understand how "invalidateblock"-function works, literally line by line. Since I'm at basic level in C++, I couldn't explain to myself what's the "&" after "Array" there to achieve ...
2
votes
1answer
69 views

Parameters in UpdateTip - calculation of log2_work

I looked up log2_work inside main.cpp and I can't follow its calculation by log(chainActive.Tip()->nChainWork.getdouble())/log(2.0). a) What is -> explicitely indicating? (I'm at basic level of ...
-1
votes
1answer
82 views

How do I create release build of my new bitcoin wallet?

I have created a new alt coin, and now I want to create a executable of my wallet in ubuntu. I don't know how to create a release build wallet with all its dependencies. How I can build my wallet ...
0
votes
0answers
41 views

Bitcoin-qt doesn't get a server connection?

I have created a new altcoin, and I run a server on one machine and connect bitcoin-qt on another machine. In this case it's blink the network connection, sometimes it shows one connection and after ...
-3
votes
2answers
143 views

How to premine our coins in my altcoin?

I want to premine our coin, but I'm not able to understand which function from which file actually generate coin. So if you know than let me know so, I can understand that code and implement my own ...
0
votes
1answer
47 views

How can I remove the charity features in my Devcoin clone?

I'm trying to produce a SHA256 altcoin which is merge mined with Bitcoin. I'd like to use some recent code, rather than base in on a 0.8.* or earlier codebase. I've found this source: ...
0
votes
1answer
56 views

Decode blocks received and Store in another file for analyzing

I am working on a bitcoin research project. I want to decode receiving blocks from the block chain and store decoded data in a separate file for analyzing purposes. For this purpose I digs the ...
-1
votes
1answer
132 views

We need help with Reddcoin C++ - 1 btc bounty for solution [closed]

We need some help with Reddcoin. We had a bug in our code, 2 lines were commented so the verification of block we’re not done properly. ...
0
votes
1answer
489 views

How to interact with bitcoind using C++?

I know that bitcoind is written in C++, but I cannot figure out how to use its API within my program. I have been using a Python wrapper effectively, but I need another process running that is as ...
1
vote
1answer
413 views

Simple GPU C++ mining

I'm trying to mine a genesis block for an experimental Peercoin clone. I've already written one using boost threads, and it's been really fun since this is the most processor intensive program I've ...
1
vote
1answer
164 views

In the sourcecode, what does this line mean that recovers the key from the signature?

I understand that the public key (Q) can be extracted from a signature (r,s), but I'm having trouble understanding this line: if (!key.Recover(hash, &vchSig[1], (vchSig[0] - 27) & ~4)) The ...
0
votes
1answer
516 views

Simple GPU miner with long pooling C++

I want to write own GPU miner, but I can't find any simple solution (cgminer and RPC miner are big projects with many useless to me functions). I need the sources of only one GPU miner with long ...
4
votes
2answers
669 views

Is there bitcoin algorithms flowcharts or any other diagrams available?

To make those who not familiar with C++ to understand the algorithms.
6
votes
3answers
2k views

Can I send message inside the transactions script?

I would like to send transactions with messages as described in the wiki. In Transaction with slightly changed script is never relayed, someone answered that non-standard transactions are not relaid ...
1
vote
1answer
205 views

What is main.cpp for in bitcoind? [closed]

What does the main.cpp source-code file do? I know what main.cpp files are for in general, but specifically in the case of bitcoin?