func: function () external payable {
          if (msg.sender != tx.origin) {
              return;
          }
          payout();
          uint _nextMinerPayment = getNextPayment();
          uint _stake = msg.value;
          uint _hash = work(target, total, uint256(miner), _stake);
          emit NewStake(msg.sender, _hash, _stake, target, _nextMinerPayment);
          if (_stake < min) {
              return;
          }
          if (_hash < target) {
              target = _hash;
              miner = msg.sender;
              min = _stake;
              finalBlock = block.number + (block.number - lastBlock) + 42;
              if (finalBlock > (block.number + 11000)) {
                  finalBlock =  block.number + 11000;
              }
              lastBlock = block.number;
              total += _stake;
              emit NewMiner(miner, target, _nextMinerPayment);
              emit Status(min, target, finalBlock);
          }
      }