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

Adding script to generate element blocks for 1 of 1 regtest #109

Closed
wants to merge 163 commits into from

Conversation

Christewart
Copy link
Contributor

Adds a simple python script to generate blocks for elements on regtest

jtimon and others added 30 commits November 1, 2016 11:48
We still verify the headers of the last -checkblocks blocks.
Allows CCoinsCacheEntry/CCoinsMap entries to either be a CCoins
or, by setting a flag in the map key, a withdraw output from a
chain from which withdraw proofs are allowed to move to this
chain from.
@cdecker
Copy link
Member

cdecker commented Jan 22, 2017

You might want to wrap the function call into

if __name__ == "__main__":
    generate_n_blocks(100)

to make the module importable 😃

@Christewart
Copy link
Contributor Author

I'll add this later tonight, I also justt placed the script in the top level directory, should it be moved somewhere else?

@Christewart
Copy link
Contributor Author

Christewart commented Jan 29, 2017

Added changes suggested by @cdecker , also adding command line arguments so we can now use it like so:

$ python generate_element_blocks.py --num=100 --datadir=$BETADATADIR

where num is the number of blocks to generate

parser = argparse.ArgumentParser()
parser.add_argument('--num')
parser.add_argument("--datadir")
datadir="~/.bitcoin/elements.conf"
Copy link
Contributor

@jtimon jtimon Jan 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you want to do

datadir="~/.bitcoin/elements/"

or

conf="~/.bitcoin/elements/elements.conf"

@jtimon
Copy link
Contributor

jtimon commented Feb 2, 2017

Needs rebase (just remove all the commits except yours and I think it should rebase without conflicts).

@jtimon
Copy link
Contributor

jtimon commented Feb 2, 2017

Actually, no, it needs to be reopened as a PR to master https://github.com/ElementsProject/elements/tree/elements-0.13.1 instead of refresh, sorry for the oversight.

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.