Bitcoin Forum
November 09, 2024, 06:01:36 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: "Payee" field in getblocktemplate in node-stratum-pool  (Read 1262 times)
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
August 14, 2014, 12:17:56 PM
Last edit: August 14, 2014, 01:21:57 PM by konradp
 #1

Hi,

Here: https://github.com/zone117x/node-stratum-pool

There is a function in transactions.js called generateOutputTransactions ( here: https://github.com/zone117x/node-stratum-pool/blob/master/lib/transactions.js#L126 ) which creates generation transaction.

And there are these lines:
Code:
    if (rpcData.payee) {
        var payeeReward = Math.ceil(reward / 5);

        reward -= payeeReward;
        rewardToPool -= payeeReward;

        var payeeScript = util.addressToScript(rpcData.payee);
        txOutputBuffers.push(Buffer.concat([
            util.packInt64LE(payeeReward),
            util.varIntBuffer(payeeScript.length),
            payeeScript
        ]));
    }

rpcData, from what I found, is a result of calling the getblocktemplate rpc command.

But what is this rpcData.payee? There is no such thing when I call getblocktemplate in bitcoin's console. And these line are the only place in the project where this "payee" occurs.

Do you have an idea?

p.s. this project is being actively developed, so I don't think it's an error.

edit: after some googling, I found that there is another project with this "payee" field from getblocktemplate:

https://github.com/darkcoinproject/darkcoin-stratum/blob/1aa9317eb1612e290d9dad232744a1cda844471a/lib/block_template.py#L57

But, apart from that, google doesn't bring any useful information.
chaeplin
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


View Profile
August 27, 2014, 02:45:26 AM
 #2

https://github.com/zone117x/node-stratum-pool/commit/c37103907007d517650cb61360826b0112895cc5


Payee is used in Darksoin's getblocktemplate
konradp (OP)
Full Member
***
Offline Offline

Activity: 129
Merit: 100



View Profile
August 27, 2014, 05:42:44 AM
 #3


Thanks! Somehow I couldn't find it.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!