public void ZCashUtils_EncodeTarget() { var equihashCoin = poolConfig.Template.As <EquihashCoinTemplate>(); var chainConfig = equihashCoin.GetNetwork(BitcoinNetworkType.Main); var result = EquihashUtils.EncodeTarget(0.5, chainConfig); Assert.Equal(result, "0010102040810204081020408102040810204081020408102040810204080fe0"); result = EquihashUtils.EncodeTarget(10000, chainConfig); Assert.Equal(result, "000000346dc5d63886594af4f0d844d013a92a305532617c1bda5119ce075e7a"); }
private string EncodeTarget(double difficulty) { return(EquihashUtils.EncodeTarget(difficulty, manager.ChainConfig)); }