niceBit

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

commit adfdad20d7a6fcaaf50fe9cffa97924fbe4495ad
parent b714bb765b1cbe8959cfdc377bd146d6d9f71b65
Author: NicholasFarrow <nicholas.w.farrow@gmail.com>
Date:   Sat, 22 Aug 2020 12:47:01 +1000

Increased verbosity

Diffstat:
MREADME.md | 6+++++-
MniceBit.c | 16++++++++--------
2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md @@ -1,4 +1,8 @@ -# Bitcoin Vanity Address Generator +<div align="center"> + <img src="https://i.imgur.com/8KgjpAK.png"> +</div> + +# A Simple Bitcoin Vanity Address Generator Create Bitcoin vanity addresses with C. An open source method to generate nice Bitcoin addresses, also serving as an example of how to use the [bitcoin-core/secp256k1](https://github.com/bitcoin-core/secp256k1) C library. diff --git a/niceBit.c b/niceBit.c @@ -170,8 +170,8 @@ int main(int argc, char **argv) { int i = 1; - clock_t starttime = clock(); - double timespent; + time_t start_time, current_time; + double time_spent; double rate; char words[100][34]; @@ -191,6 +191,7 @@ int main(int argc, char **argv) { } puts("Beginning search...\n"); + time(&start_time); while (1) { if (!gen_keypair(seckey, pubaddress, ctx)) { printf("Failed to create keypair\n"); @@ -209,12 +210,11 @@ int main(int argc, char **argv) { } if (i % 100000 == 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); + time(&current_time); + time_spent = difftime(current_time, start_time); + + rate = (double)(i / time_spent); + printf("Generated %d addresses in %.1fs. Rate:%.1f/s \n", i, time_spent, rate); } i++;