niceBit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 641cec18396b80809d61aace80f462e1f886c1ac
parent c448db33046ac8200d3e5dd66c1658244a32e90d
Author: NicholasFarrow <nicholas.w.farrow@gmail.com>
Date:   Fri, 24 Jan 2020 14:02:23 +1100

Code timing w output. 313/s

Diffstat:
MniceBit.c | 21++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/niceBit.c b/niceBit.c @@ -1,4 +1,5 @@ #include <stdio.h> +#include <time.h> #include <secp256k1.h> #include "create_pubkey.h" @@ -88,7 +89,7 @@ int check_vanity(unsigned char *pubaddress) { /* For each vanity length * ('len' digits in a row) */ - for(int len=10; len>4; len--) { + for(int len=10; len>5; len--) { /* For each digit 1-9 */ for(int i=0; i<10; i++) { @@ -121,7 +122,14 @@ int check_vanity(unsigned char *pubaddress) { int main() { unsigned char seckey[32]; unsigned char pubaddress[40]; + + int i = 1; + + + clock_t starttime = clock(); + double timespent; + double rate; while(1) { if(!gen_keypair(seckey, pubaddress)) { printf("Failed to create keypair\n"); @@ -139,6 +147,17 @@ int main() { else { ; /*printf("nothing...\n\n");*/ } + + if(i%10000 == 0) { + clock_t currenttime = clock(); + timespent = + (double)((currenttime - starttime) + / CLOCKS_PER_SEC); + rate = (double)(i / timespent); + printf("Generated %d addresses in %.1fs. Rate:%.1f/s \n", i, timespent, rate); + } + + i++; } }