Skip to content

Change the workername and password on the fly #1

@anemol

Description

@anemol

For some reason, i need to change the worker's name & password on the fly.

I tried to intercept mining.authorize and mining.submit methods but the miner program (minerd) doesn't want to work normally.

 self.socket.on('data', function(data) 
    {
        var json=JSON.parse(data.toString());
        if (json.method=='mining.authorize')
        {
            json.params[0]='newWorker';
            json.params[1]='x';
            self.onServerData(Buffer.from(JSON.stringify(json)));
        }
        else if (json.method=='mining.submit')
        {
            json.params[0]='newWorker';
            self.onServerData(Buffer.from(JSON.stringify(json)));
        }
        else  
            self.onServerData(data);
    });

Any idea how to do this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions