挖矿就是在寻找sha256d值小的随机数。
min="1"; time for i in {660000..670000}; do r=`echo -n $i | sha256sum`; if [ "$r" \< "$min" ]; then min=$r; n=$i; fi; done; echo $n; echo $min;
输出
real 0m14.925s
user 0m0.476s
sys 0m1.032s
665782
0000000399c6aea5ad0c709a9bc331a3ed6494702bd1d129d8c817a0257a1462 -