Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return last_unused addresses, parse .ini and create online wallet at startup #13

Merged
merged 5 commits into from
Mar 21, 2021

Conversation

notmandatory
Copy link
Contributor

@notmandatory notmandatory commented Mar 17, 2021

Changed:

  • /bitcoin returns last unused address instead of a new address every time, fixes New unused addresses #7
  • /bitcoin/api/new renamed to /bitcoin/api/last_unused which also returns last unused address
  • load and parse .ini file prior to starting server
  • create wallet once prior to starting server and share between requests
  • create wallet as online to be able to monitor what the last unused address is
  • specify the electrum server url in .ini file

I also ran cargo fmt, if everyone uses it it will be easier to review and merge :-)

@notmandatory notmandatory force-pushed the feat/get_unused_addr branch 5 times, most recently from cf82383 to 3448cb9 Compare March 17, 2021 22:10
@notmandatory notmandatory changed the title Add structopt based config options and /bitcoin/api/unused end point Add structopt based config options and last_unused end point Mar 17, 2021
@notmandatory notmandatory marked this pull request as ready for review March 17, 2021 23:40
@notmandatory
Copy link
Contributor Author

BTW, this turned into a bit larger change than I originally intended so happy to discuss any parts of it and how to integrate with what you're plans are for this project.

@lvaccaro
Copy link
Owner

lvaccaro commented Mar 18, 2021

ack 6983ce4

Thanks to fix other cosmetic stuff in the code.
I think a user could always put global vars into a file and run source to load the content.

Maybe it is time to brainstorming ideas in a separate issue: #14

@notmandatory
Copy link
Contributor Author

I'm going to redo this PR to have just the last_unused part and not the struct_opt stuff. I'll create a new PR for that if it makes sense later.

@notmandatory notmandatory changed the title Add structopt based config options and last_unused end point Return last_unused addresses, parse .ini and create online wallet at startup Mar 18, 2021
@notmandatory
Copy link
Contributor Author

notmandatory commented Mar 19, 2021

I'm done scaling back this PR to the things mentioned in the description.

I'd also like like to update the CI to make sure cargo fmt is always ok, but can do that separately if it works for you.

@lvaccaro
Copy link
Owner

utack 4f2e6a6

@lvaccaro lvaccaro merged commit 488f775 into lvaccaro:master Mar 21, 2021
@notmandatory notmandatory deleted the feat/get_unused_addr branch March 21, 2021 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New unused addresses
2 participants