12 Jul, 2018

EMC2 Segwit yiimp problem – coins keeps auto_enable false

I have stumble upon many hours on why i the stratum server connects and disconnects from daemon. I got a lot of :

17:20:09: disconnecting from coind EMC2
17:29:42: connecting to coind EMC2
17:31:09: disconnecting from coind EMC2

You must do two things to fix this.

1. Check Use Segwit from the panel, otherwise you will get this :

einsteinium-cli getblocktemplate
error code: -8
error message:
Support for 'segwit' rule requires explicit client support

2. Make a modification in yiimp/web/yaamp/core/backend/coins.php
https://github.com/tpruvot/yiimp/blob/495dcbba00761d4b266b9453e0d31a78f599e7ed/web/yaamp/core/backend/coins.php

Change

$template = $remote->getblocktemplate('{}');

With

if($coin->usesegwit)
{
$template = $remote->getblocktemplate('{"rules":["segwit"]}');
}
else
{
$template = $remote->getblocktemplate('{}');
}

What happens? Stratum server works well, but the PHP backend keeps making $coin->auto_enable = false over and over and over and over.

Hope it helps.

About : adminux

Leave a Reply

Your email address will not be published. Required fields are marked *