Author

Topic: "Payee" field in getblocktemplate in node-stratum-pool (Read 1263 times)

full member
Activity: 129
Merit: 100
sr. member
Activity: 294
Merit: 250
full member
Activity: 129
Merit: 100
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.
Jump to: